
September 28th, 2012, 02:29 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 5
Time spent in forums: 1 h 51 m 20 sec
Reputation Power: 0
|
|
|
Other - Digits and decimal points
Hello everyone, I'm having an issue with decimal points and my Regex.
Lets say I have something like:
[21,[10355.0,8039.48,0.00895691]]
I use the regex
Code:
\[(\d+)\,\[(-?\d+)\.\d+\,(-?\d+)\.\d+,([\d|.|-]+)\]\]
which works just fine, however when I have something like:
[21,[10355,8039.48,0.00895691]]
that does not have a decimal point in one of the digit groups I don't get any matches.
Can someone please help me with my number capture groups to also allow for a group without a decimal point..
Thanks 
|