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

Please support RegExLib Sponsors

Sponsors

Browse Expressions by Category

107 regular expressions found in this category!

Expressions in category: Numbers

Change page:   |    Displaying page 2 of 6 pages; Items 21 to 40
Title Test Details Pattern Title
Expression
^[-+]?\d*$
Description
Matches any integer number or numeric string, including positive and negative value characters (+ or -). Also matches empty strings.
Matches
123 | -123 | +123
Non-Matches
abc | 3.14159 | -3.14159
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^\d*\.?\d*$
Description
Matches any unsigned floating point number/numeric string. Also matches empty strings.
Matches
123 | 3.14159 | .234
Non-Matches
abc | -3.14159 | 3.4.2
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^(\d{1,3}'(\d{3}')*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$
Description
This regex match numeric data in the following format: thousands are separated by (') apostrophe, decimal places are separated by dot (.) Maximum three decimal places are not required. It's easy to change to other separators as well.
Matches
1'235.140 | 1'222'333.120 | 456
Non-Matches
1234.500 | 78'45.123 | 123,0012
Author Rating: Not yet rated. Dalibor Kalna
Title Test Details Pattern Title
Expression
^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$
Description
Matches currency input with or without commas.
Matches
$3,023,123.34 | 9,876,453 | 123456.78
Non-Matches
4,33,234.34 | $1.234 | abc
Author Rating: Not yet rated. Brian Orrell
Title Test Details Pattern Title
Expression
^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$
Description
This is a pattern to search and verify that a decimal number ends with a 25, 50, 75, 0 or 00. It does match for a nothing after decimal also but I guess thats ok !!
Matches
0.25 | .75 | 123.50
Non-Matches
.77 | 1.435
Author Rating: Not yet rated. narsi v
Title Test Details Pattern Title
Expression
(^[0-9]{1,8}|(^[0-9]{1,8}\.{0,1}[0-9]{1,2}))$
Description
Matches number in format XX.XX Please note that this expression allows maximum of 8 digits before the dot and 2 (optional) digits after the dot.
Matches
1.00 | 2345 | 332.3
Non-Matches
.00 | 23333333333.00 | j22.00
Author Rating: Not yet rated. Danil Sholokhov
Title Test Details Pattern Title
Expression
^\d(\d)?(\d)?$
Description
Matches positive whole numbers from 0-999
Matches
0 | 12 | 876
Non-Matches
1000 | 1.23 | -234
Author Rating: Not yet rated.
Title Test Details Pattern Title
Expression
^([0-9]*|\d*\.\d{1}?\d*)$
Description
Accept only (0-9) integer and one decimal point(decimal point is also optional).After decimal point it accepts at least one numeric .This will be usefull in money related fields or decimal fields.
Matches
.568 | 8578 | 1234567.1234567
Non-Matches
568. | 56.89.36 | 5.3.6.9.6
Author Rating: Not yet rated. sanjayanthan vijayakeerthi
Title Test Details Pattern Title
Expression
^[-+]?\d*\.?\d*$
Description
Matches any floating point numer/numeric string, including optional sign character (+ or -). Also matches empty strings.
Matches
123 | +3.14159 | -3.14159
Non-Matches
abc | 3.4.5 | $99.95
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$
Description
Match any number between 1 and 50, no characters, no empty sets, and not zero. Match numbers greater than 1 and less than 51, no spaces, no characters.
Matches
1 | 23 | 50
Non-Matches
0 | 111 | xyz
Author Rating: Not yet rated. Michael Gaertner
Title Test Details Pattern Title
Expression
^[12345]$
Description
This matches a single numeric digit between 1 and 5, and is the same as saying ^[1-5]$.
Matches
1 | 2 | 4
Non-Matches
6 | -1 | abc
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,3})?$
Description
This regular expression validates a number NOT 0, with no more than 5 places ahead and 3 places behind the decimal point.
Matches
1 | 12345.123 | 0.5
Non-Matches
0 | 0.0 | 123456.1234
Author Rating: Not yet rated. Michael Trefry
Title Test Details Pattern Title
Expression
^[-+]?\d+(\.\d+)?$
Description
This matches any real number, with optional decimal point and numbers after the decimal, and optional positive (+) or negative (-) designation.
Matches
123 | -123.45 | +123.56
Non-Matches
123x | .123 | -123.
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9])?$
Description
Matches
$28,009,987.88 | $23,099.05 | $.88
Non-Matches
$234,5.99
Author Rating: Not yet rated. yahnique barrett
Title Test Details Pattern Title
Expression
^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$
Description
This is permit all decimal number, exclude all alphanumeric caracter
Matches
123456.123456 | 123456,123456 | 123456
Non-Matches
123a.123 | 123a,123 | a
Author Rating: Not yet rated. Hugues Gauthier
Title Test Details Pattern Title
Expression
\$[0-9]?[0-9]?[0-9]?((\,[0-9][0-9][0-9])*)?(\.[0-9][0-9]?)?$
Description
Matches
$1,456,983.00 | $1,700.07 | $68,944.23
Non-Matches
$20,86.93 | $1098.84 | $150.
Author Rating: Not yet rated. Snikwad Kcirtap
Title Test Details Signed Integer
Expression
^(\+|-)?\d+$
Description
Matches any signed integer.
Matches
-34 | 34 | +5
Non-Matches
abc | 3.1415 | -5.3
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^[1-5]$
Description
This matches a single numeric digit between 1 and 5, and is the same as saying ^[12345]$.
Matches
1 | 3 | 4
Non-Matches
6 | 23 | a
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^\d*$
Description
Accepts an unsigned integer number. Also matches empty strings.
Matches
123 | 000 | 43
Non-Matches
asbc | -34 | 3.1415
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^\$[0-9]+(\.[0-9][0-9])?$
Description
Validates a dollar amount including a dollar sign and 2 decmals. The decimal and cents are optional.
Matches
$1.50 | $49 | $0.50
Non-Matches
1.5 | $1.333 | this $5.12 fails
Author Rating: Not yet rated. Bob Levittan
Change page:   |    Displaying page 2 of 6 pages; Items 21 to 40

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