-1

I am trying to come up with a regex to identify different format of numerals like 1000 1 000 and 1,000 as well as 1000000 1 000 000 etc. I tried the following

(?<=(\s|,))\d{1,}(?=(\s|,)) 

but I need it to include the space or comma.

Barmar
  • 741,623
  • 53
  • 500
  • 612
prof
  • 41
  • 1
  • 1
  • 3

1 Answers1

1

Have you tried \d+([\s,]*\d*)*? Didn't get to test it, but I think it should work