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 3
Title Test Details Pattern Title
Expression
^1000([.][0]{1,3})?$|^\d{1,3}$|^\d{1,3}([.]\d{1,3})$|^([.]\d{1,3})$
Description
allows positive none-to-3-decimal values between 0.000 and 1000.000
Matches
.123 | 0.126 | 1000.000
Non-Matches
.1234 | 0.1b6 | 1000.001
Author Rating: Not yet rated. gregg durishan
Title Test Details Pattern Title
Expression
^(\-)?1000([.][0]{1,3})?$|^(\-)?\d{1,3}$|^(\-)?\d{1,3}([.]\d{1,3})$|^(\-)?([.]\d{1,3})$
Description
allows positive and negative none-to-3-decimal values between -1000.000 and 1000.000
Matches
123.456 | -0.125 | -1000.000
Non-Matches
123.4567 | -0.1b5 | -1000.001
Author Rating: The rating for this expression. gregg durishan
Title Test Details Pattern Title
Expression
^\$?\-?([1-9]{1}[0-9]{0,2}(\,\d{3})*(\.\d{0,2})?|[1-9]{1}\d{0,}(\.\d{0,2})?|0(\.\d{0,2})?|(\.\d{1,2}))$|^\-?\$?([1-9]{1}\d{0,2}(\,\d{3})*(\.\d{0,2})?|[1-9]{1}\d{0,}(\.\d{0,2})?|0(\.\d{0,2})?|(\.\d{1,2}))$|^\(\$?([1-9]{1}\d{0,2}(\,\d{3})*(\.\d{0,2})?|[1-9]{1}\d{0,}(\.\d{0,2})?|0(\.\d{0,2})?|(\.\d{1,2}))\)$
Description
currency format that allows optional $, optional "-"(MinusSignNegative) OR "()" (ParenNegative) but not both, optional cents, and optional commas separating thousands. Minus sign can be before or after $, but parens must be outside the $. UPDATED: now fails to match a "$" without any further numbers
Matches
($4,000.00) | -$4000.00 | -$400.00
Non-Matches
4,00.000 | abc | $
Author Rating: The rating for this expression. gregg durishan
   Displaying page 1 of 1 pages; Items 1 to 3

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