currency
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngregexp' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Dan Caron
How would I change this regular expression so that it also allows an empty
string?

^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$

Reply to this message...
 
    
Steven A Smith (VIP)
Add
^$|
to the beginning of it. That should make it read "Empty string OR (dan's
big expression)".

Steve

Steven Smith, MCSE+Internet, Microsoft MVP: ASP.NET
Click here to reveal e-mail address
President, ASPAlliance.com
http://aspalliance.com The #1 ASP.NET Community
http://aspsmith.com ASP.NET Training for ASP Developers

Learning ASP.NET? Get My Book: ASP.NET By Example
http://amazon.com/exec/obidos/ASIN/0789725622/stevenatorasp/
----- Original Message -----
From: "Dan Caron" <Click here to reveal e-mail address>
Newsgroups: aspngregexp
To: "aspngregexp" <Click here to reveal e-mail address>
Sent: Wednesday, June 05, 2002 10:48 AM
Subject: [aspngregexp] currency

[Original message clipped]

Reply to this message...
 
 




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com