Monday, 19 August 2013

Extract only the numbers that are not around letters?

Extract only the numbers that are not around letters?

I would like to match only the pure numbers in a string like:
1,100,1000,c4,c5,c6,c10,c100
And I have tried thisF
[^c]\d+
And it still included the sub-strings starting with 'c'.
I have also tried this:
[^c\d+]\d+
And it excluded those sub-strings starting with 'c' but the matched was
like ,100, which was not what I want either.
What could be the solution?

No comments:

Post a Comment