2

I'm trying to get a VB regex to match only the numbers in a currency sequence without additional substitution lines if possible. It needs to look for a number with + on end $ at the start and return what's in the middle, minus any commas.

Accordingly

 $10,000+ match returns 10000

$20,000+ match returns 20000

$30,000+ match returns 30000

$1,000,000+ match returns 1000000

$10,000 (anything without the trailing +) should *not* match

I can easily get the match to the value but I can't figure out how to get rid, of the trailing + or the prefix and commas inside.

Beloo
  • 9,723
  • 7
  • 40
  • 71
Stewart Marshall
  • 147
  • 1
  • 3
  • 11

1 Answers1

2

Your regex is \$(\d+(,?\d+)*)\+. Group 1 is what you are looking for
Check here

After retrieving results you should remove commas from it

Beloo
  • 9,723
  • 7
  • 40
  • 71