4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Javascript regex help please
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
php4ever
Junior WebHelper
Junior WebHelper


Joined: 10 Oct 2002
Posts: 49

PostPosted: Thu Jun 26, 2003 11:34 pm (20 years, 9 months ago) Reply with QuoteBack to Top

Hi, I'm trying to come up with a decent regex to do price validation.

I want to validate expressions like: $9,999,999.00 and exclude stuff like $9,99,99.00

So far I've come up with this:

/^\\$([0-9]+\\,[0-9]+)*([0-9]+\\,[0-9]+|[0-9]+)\\.[0-9]{2}$/g

Can anyone please put out my logic error(s) or offer a better regex?

Many thanks.
OfflineView User's ProfileFind all posts by php4everSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.263178 seconds :: 19 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme