Regex to get dollars from string


I have strings like this:
US-1 | value up to $5,000
UK-3 | value up to $75,000

I want only the dollar value without dollar sign or comma. From the above, my expected output would be:

Thanks in advance


If you want to only get the number with no comma, you’ll have to modify that expression to be as such:

regex.match(myString,"(?<=\$)[\d,]").value.Replace(",", string.empty)

for working with a regex approach we provided some patterns.

Also have a look here:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.