tags:

views:

23

answers:

1

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 '$'.

+2  A: 

Try this:

\$\d+\$

And if you don’t want to allow leading zeros:

\$[1-9]\d*\$
Gumbo
thanks, I hate asking questions like this I should be able to do this myself but the learning curve seems steep
shogun
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
http://www.gskinner.com/RegExr/
amra
favorite learn source is http://www.regular-expressions.info/ And for writing regular expression try http://www.gskinner.com/RegExr/
amra