RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 2
Title Test Details Pattern Title
Expression
^\$?(\d{1,3},?(\d{3},?)*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{2})?)$
Description
Expression to handle US currency entry in .NET. Handy for regular expression validation controls where the user can be entering in a currancy value but you can't control explict entry values. Will accept a wide variety of values that can be easy cast to a double via the CDbl function. Expression is also compatible with default US string format for currency.
Matches
10000 | 10,000 | $1,000.00
Non-Matches
0.002 | x.0
Author Rating: Not yet rated. brent stineman
Title Test Details Pattern Title
Expression
^\d{0,2}(\.\d{1,4})? *%?$
Description
An expression for .NET regular expression validation controls intended to faciliate the entry of percentage values both a whole numbers or as their decimal representations. Also compatible with the default US format for string formatting for percentages. Recommend that if you intended accept a value passing this express that you strip the percentage signs and take measures to ensure that any whole values are converted to percentages.
Matches
4.0% | 0.45 | .0345
Non-Matches
123 | %12
Author Rating: Not yet rated. brent stineman
   Displaying page 1 of 1 pages; Items 1 to 2

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials