human
python regex: match a string with only one instance of a character
assistant
Here is some code to match regex pattern '\\$[0-9]+[^\\$]*$' on string '$1 off delicious $5 ham.'

re.match('\\$[0-9]+[^\\$]*$', '$1 off delicious $5 ham.')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.