So that means "$1$" will pass as well as "$50000000000000$" or "$12345678$" length of number doesn't matter but it must be only digits and must start and end with a '$'.
views:
23answers:
1
Q:
Help me write a regex that validates a number of any size that is between two special characters?
+2
A:
Try this:
\$\d+\$
And if you don’t want to allow leading zeros:
\$[1-9]\d*\$
Gumbo
2010-09-20 21:20:14
thanks, I hate asking questions like this I should be able to do this myself but the learning curve seems steep
shogun
2010-09-20 21:21:09
I suggest reading http://oreilly.com/catalog/9780596528126/ ... utterly, utterly boring, but after plowing through it no regex should be a problem for you.
Sorcy
2010-09-20 21:29:25
http://www.gskinner.com/RegExr/
amra
2010-09-20 21:39:06
favorite learn source is http://www.regular-expressions.info/ And for writing regular expression try http://www.gskinner.com/RegExr/
amra
2010-09-20 21:39:44