Syntactic Confectionery Delight | |
PerlMonks |
Re: Regular Expression Currency Checkby Tomtom (Scribe) |
on Jun 02, 2005 at 13:49 UTC ( [id://462915]=note: print w/replies, xml ) | Need Help?? |
Try this :
I added (?=\d{3}) for a look ahead, otherwise, it matches things like "2,34,3.56". If you have a comma, you're supposed to have three digits just afterwards. ( I hope I'm being clear enough ). Moreover, you could add "?:" since you're not capturing any pattern.
In Section
Seekers of Perl Wisdom
|
|