R
Robert Mark Bram
Hi All,
I want an expression that will allow a decimal number or a specific
string. For example, I want the following to be valid:
..1
1
1.1
-.1
-1
-1.1
remove
REMOVE
REmove
Here is the regular expression I am testing:
-{0,1}\d{0,5}(\.(\d){0,2})?|(?i)REMOVE
It accepts the numbers, but not the strings.
If I use this:
-{0,1}\d{1,5}(\.(\d){0,2})?|(?i)REMOVE
it accepts the string and most numbers, but not this:
..1
I am testing with this demo applet:
http://jakarta.apache.org/oro/demo.html
Can anyone figure what I am doing wrong? Any help would be most
appreciated!
Rob
I want an expression that will allow a decimal number or a specific
string. For example, I want the following to be valid:
..1
1
1.1
-.1
-1
-1.1
remove
REMOVE
REmove
Here is the regular expression I am testing:
-{0,1}\d{0,5}(\.(\d){0,2})?|(?i)REMOVE
It accepts the numbers, but not the strings.
If I use this:
-{0,1}\d{1,5}(\.(\d){0,2})?|(?i)REMOVE
it accepts the string and most numbers, but not this:
..1
I am testing with this demo applet:
http://jakarta.apache.org/oro/demo.html
Can anyone figure what I am doing wrong? Any help would be most
appreciated!
Rob