Regex to match dollar sign, money, decimals only

You can simply search with following regex.

Regex: \$\d+(?:\.\d+)?

Explanation:

\$: ensures dollar sign followed by

\d+: more or one digits

(?:\.\d+)?: decimal part which is optional

Regex101 Demo


Just replace the space within your negated-character class with closed bracket:

In [37]: x = re.findall(r"\$[^\]]+", y)

In [38]: x
Out[38]: ['$1.19', '$5.29'] 

Best Regular Expressions for this case is

\$\d+(?:.(\d+))?

Explanation

\$ shows it should starts with a dollar sign

\d+ matches all numbers before decimal

(?:.(\d+)) matches if there are any numbers after the decimal. For example in $1.12 it would match .12 and capture 12 (part after the decimal) . If the money is $1. it would only match $1 it would not match .

Regular Expression tester, library, tutorials and cheat sheet.