Reputation: 1255
I have a regex which looks like (?![A-Z])[0-9]+\.?[0-9]?+
This currently finds
The last portion of I00001.12
and
00000.12 00000
But I don't want it to find I00001.12 or any part of that string
is this possible with Regex?
Upvotes: 0
Views: 40
Reputation: 11713
It seems you're trying to match pure floating point numbers. If so, try using following regex
^[0-9.]+$
Note : Above regex is very crude. If you have strict requirement of matching only valid floating points, consider using following regex.
^[0-9]+(\.[0-9]+)?$
-- based on comments from @FrankieTheKneeMan and @anubhava
Upvotes: 1