I have a regex which will match amount in $.
(\-?\$\-?[0-9]+\.?[0-9]*|usd\-?[0-9]+\.?[0-9]*|[0-9]+\.?[0-9]*\-?usd|[0-9]*\.?[0-9]*\$)
Currently its matching for $250, USD250 etc, it should not match the $250 in $250abchhh.
So, I tried word boundary, but it didn't fix the issue as well, how can I fix this issue?
matching cases are
$456
$45.6
$.5
$-45
-$45
usd-456
usd46
usd4.6
usd.46
1$
1.5$
.5$
-.5$
5usd
456usd
it should not match
455$abc
abc$123
abcuds1
jhb$5665usdjnjnb
$usd1555
usd$768
$566usd
$5788usdbjhj