Hi all,
Have a number which can be a 1 or more digits. Max number has thousands separator
Trying to work out a regex to match any of these:
Works for single digit and 3 digit numbers
and
works for 4 digit numbers, but I can't get a single regex to find all three numbers
Is there an easy way to do this?
Example numbers
3
456
3,345
Have a number which can be a 1 or more digits. Max number has thousands separator
Trying to work out a regex to match any of these:
Code:
'345' -match '(\d{1,})'
"Number is $($matches[1])"
and
Code:
'3,345' -match '(\d{1}\,\d{1,3})'
works for 4 digit numbers, but I can't get a single regex to find all three numbers
Is there an easy way to do this?
Example numbers
3
456
3,345