Jarrod13
Programmer
- Dec 18, 2008
- 12
I'm trying to modify the following regular expression so that leading zeros will fail the check.
For example,
if I input 00000500.25
This will pass the regex, I would like that to fail.
The following should pass:
500.25
0.00
1.15
The following should fail:
00000500.25
000.00
0001.15
Thanks for the help.
Code:
if(Currency !~ /^((|-)[0-9]+\.[0-9][0-9])$/ && Currency !~ "^[ \t]*$")
For example,
if I input 00000500.25
This will pass the regex, I would like that to fail.
The following should pass:
500.25
0.00
1.15
The following should fail:
00000500.25
000.00
0001.15
Thanks for the help.