I'm stumped.
Can anyone give me the regular expression for testing a string to see if it's a non negative real?
ie
0.000 F
0.001 T
0.101 T
1.000 T
1.111 T
There is no fixed length to the decimal part, either.
Many thanks,
M
Printable View
I'm stumped.
Can anyone give me the regular expression for testing a string to see if it's a non negative real?
ie
0.000 F
0.001 T
0.101 T
1.000 T
1.111 T
There is no fixed length to the decimal part, either.
Many thanks,
M
If csng(field) > 0 then
endif
Thanks for the quick reply, but that's not a regular expression.Quote:
Originally Posted by Pasvorto
For instance, a non-negative integer can be matched using '^-{0}[0-9]+$' which denotes the set of integers 0,1,2,3,4 . . .n
Just add a decimal point and any number of integers, in that order, to the right end. I'm a bit rusty at Regex, but I think it would be ^-{0}d+\.d+$
Thanks.
The '^-{0}\d+\.\d+$' expression does evaluate reals, but does not exclude 0.0