You are here: Re: Regular Expression question..simple! « All PHP « IT news, forums, messages
Re: Regular Expression question..simple!

Posted by Preventer of Work on 01/31/07 00:00

gene.ellis@gmail.com wrote:
> Hey everyone! I am banging my head on this regular expression problem.
> I want to validate US currency. So far I have '^(\.[0-9]+|[0-9]+(\.
> [0-9]*)?)$'
>
> but this fails if I use a commna (i.e. 2,000.00). Any help would be
> greatly appreciated!
>

One way to deal with it is to strip out any commas first.
You probably don't want them anyway.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация