Hey all.
I have some text along the lines of:
"There are 12,345,678 people in the country of.......(0.3% of which blah blah blah)", and what I am trying to do is grab the number of people in the country only.
The number can be any where from 0 to <insert biggest number you can think of ) but will contain commas in the right places.
I am still trying to get my head round regex, and to be honest not very successfully so any help or pointers appreciated on a Sunday morning!!
Cheers
EDIT: (\d+)(,\d+)* but that also matches the second lot of numbers (0.3 in the example above) - getting there
I have some text along the lines of:
"There are 12,345,678 people in the country of.......(0.3% of which blah blah blah)", and what I am trying to do is grab the number of people in the country only.
The number can be any where from 0 to <insert biggest number you can think of ) but will contain commas in the right places.
I am still trying to get my head round regex, and to be honest not very successfully so any help or pointers appreciated on a Sunday morning!!
Cheers
EDIT: (\d+)(,\d+)* but that also matches the second lot of numbers (0.3 in the example above) - getting there
Last edited: