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 4 of 6 pages; Items 61 to 80
Title Test Details Pattern Title
Expression
^\d?\d'(\d|1[01])"$
Description
Height notation for feet (') and inches(")
Matches
6'3" | 5'11" | 10'0"
Non-Matches
9 Feet 2 inches | 5'12" | 5'2 1/2"
Author Rating: Not yet rated. Michael Ash
Title Test Details Unsigned Byte type
Expression
(0|(\+)?([1-9]{1}[0-9]{0,1}|[1]{1}[0-9]{0,2}|[2]{1}([0-4]{1}[0-9]{1}|[5]{1}[0-5]{1})))
Description
Will match an unsigned byte, from range 0 to 255
Matches
0 | 10 | 127 | 255
Non-Matches
-10 | -1 | +0 | -0 | 256
Author Rating: Not yet rated. João Batista Neto
Title Test Details Byte type
Expression
^(0|[-]{1}([1-9]{1}[0-9]{0,1}|[1]{1}([0-1]{1}[0-9]{1}|[2]{1}[0-8]{1}))|(\+)?([1-9]{1}[0-9]{0,1}|[1]{1}([0-1]{1}[0-9]{1}|[2]{1}[0-7]{1})))$
Description
Not just a number, a byte type. Will match any number from range -128 to 127.
Matches
-128 | 127 | 0 | 1 | -10
Non-Matches
-129 | 128 | -0 | +0
Author Rating: Not yet rated. João Batista Neto
Title Test Details Pattern Title
Expression
^(\$\ |\$)?((0|00|[1-9]\d*|([1-9]\d{0,2}(\,\d{3})*))(\.\d{1,4})?|(\.\d{1,4}))$
Description
Allows for a dollar sign with no space after, a dollar sign with a space after, and no dollar sign. Also makes sure theres no more than 4 decimal places. Takes out leading zeros if the number isn't 0, and protects against blank entries.
Matches
$ 123.4 | $00.5 | 200,000
Non-Matches
$012,234.44 | -39.05 | $45,23,330.00
Author Rating: Not yet rated. Corey Charlton
Title Test Details Short type
Expression
^(0|[-]{1}([1-9]{1}[0-9]{0,3}|[1-2]{1}[0-9]{1,4}|[3]{1}([0-1]{1}[0-9]{3}|[2]{1}([0-6]{1}[0-9]{2}|[7]{1}([0-5]{1}[0-9]{1}|([6]{1}[0-8]{1})))))|(\+)?([1-9]{1}[0-9]{0,3}|[1-2]{1}[0-9]{1,4}|[3]{1}([0-1]{1}[0-9]{3}|[2]{1}([0-6]{1}[0-9]{2}|[7]{1}([0-5]{1}[0-9]{1}|([6]{1}[0-7]{1}))))))$
Description
Short type, will match a short number from range -32768 to 32767.
Matches
-32768 | -10 | 0 | 10 | 32767
Non-Matches
+0 | -0 | -32769 | 32768
Author Rating: Not yet rated. João Batista Neto
Title Test Details Pattern Title
Expression
^(0)$|^([1-9][0-9]*)$
Description
This regular expression matches on postive whole numbers and 0. Whole numbers that are left padded with 0's are not a match.
Matches
12 | 0 | 1200
Non-Matches
-12 | 0012
Author Rating: Not yet rated. T H
Title Test Details Int type
Expression
(0|[1-9]{1}[0-9]{0,8}|[1]{1}[0-9]{1,9}|[-]{1}[2]{1}([0]{1}[0-9]{8}|[1]{1}([0-3]{1}[0-9]{7}|[4]{1}([0-6]{1}[0-9]{6}|[7]{1}([0-3]{1}[0-9]{5}|[4]{1}([0-7]{1}[0-9]{4}|[8]{1}([0-2]{1}[0-9]{3}|[3]{1}([0-5]{1}[0-9]{2}|[6]{1}([0-3]{1}[0-9]{1}|[4]{1}[0-8]{1}))))))))|(\+)?[2]{1}([0]{1}[0-9]{8}|[1]{1}([0-3]{1}[0-9]{7}|[4]{1}([0-6]{1}[0-9]{6}|[7]{1}([0-3]{1}[0-9]{5}|[4]{1}([0-7]{1}[0-9]{4}|[8]{1}([0-2]{1}[0-9]{3}|[3]{1}([0-5]{1}[0-9]{2}|[6]{1}([0-3]{1}[0-9]{1}|[4]{1}[0-7]{1})))))))))
Description
Will match any integer from range -2147483648 to 2147483647.
Matches
-2147483648 | -100 | 0 | 100 | 2147483647
Non-Matches
-2147483649 | -0 | +0 | 2147483648
Author Rating: Not yet rated. João Batista Neto
Title Test Details Unsigned Short Type
Expression
^(0|(\+)?([1-9]{1}[0-9]{0,3})|([1-5]{1}[0-9]{1,4}|[6]{1}([0-4]{1}[0-9]{3}|[5]{1}([0-4]{1}[0-9]{2}|[5]{1}([0-2]{1}[0-9]{1}|[3]{1}[0-5]{1})))))$
Description
Will match an unsigned short number from range 0 to 65535
Matches
0 | 100 | 65535
Non-Matches
-0 | +0 | -10 | 65536
Author Rating: Not yet rated. João Batista Neto
Title Test Details Pattern Title
Expression
^\$?\d+(\.(\d{2}))?$
Description
To evaluate an amount with or without a dollar sign where the cents are optional.
Matches
$2.43 | 2.02 | $2112
Non-Matches
2.1 | $.14 | $2,222.12
Author Rating: Not yet rated. Daniel Repaci
Title Test Details Pattern Title
Expression
(\d{1,3},(\d{3},)*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{3})?)$
Description
Dollar Amount
Matches
2&651.50 | 987.895
Non-Matches
25$%787*
Author Rating: Not yet rated. Snikwad Kcirtap
Title Test Details Pattern Title
Expression
(^[+]?\d*\.?\d*[1-9]+\d*$)|(^[+]?[1-9]+\d*\.\d*$)
Description
Accepts only positive decimal values. Zero and negative numbers are non-matching.Allows zeros after last non-zero numeric value after decimal place for significant digits
Matches
01.23 | 0.15 | 0.1568
Non-Matches
0 | -0.18 | .0
Author Rating: Not yet rated. Miguel Gutierrez
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 Pattern Title
Expression
^\-?[0-9]{1,3}(\,[0-9]{3})*(\.[0-9]+)?$|^[0-9]+(\.[0-9]+)?$
Description
Formatted Number with "," as thousand separator and "." as decimal separator. now accept numbers without separators of thousands.
Matches
10,000,000.123 | 3.14159265
Non-Matches
2.7,1828183
Author Rating: Not yet rated. German Gonzalez
Title Test Details Currency
Expression
^\$( )*\d*(.\d{1,2})?$
Description
Validates US currency but allows for spaces between the dollar sign and dollar amount. If there is cents the period validates to two decimal places
Matches
$100.00 | $100 | $10.25
Non-Matches
100. | $10.233 | $10.
Author Rating: Not yet rated. Vincent Faller
Title Test Details Pattern Title
Expression
^(?=.*[1-9].*$)\d{0,7}(?:\.\d{0,9})?$
Description
Allows up to seven digits to the left and up to nine digits to the right of an optional decimal place. Leading zeros on the left of the decimal are accepted. Only positive values are accepted.
Matches
1 | 0123456.123456789 | .123456789
Non-Matches
.0123456789 | 0.0 | -1
Author Rating: Not yet rated. Bri Gipson
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
^( 100(?:\.0{1,2})? | 0*?\.\d{1,2} | \d{1,2}(?:\.\d{1,2})? )% $
Description
Matches a percentage between 0 and 100 (inclusive). Accepts up to 2 decimal places.
Matches
0% | 100% | .17%
Non-Matches
101% | -17 | 99.006%
Author Rating: Not yet rated. Darren Neimke
Title Test Details Pattern Title
Expression
^\d{1,7}$
Description
Positive Whole number matched from 0 to 9999999. Only 7 digits length is allowed.
Matches
1234567 | 9999999 | 1
Non-Matches
12345678 | 9999.99 | -1234
Author Rating: Not yet rated. Prashant Nayak
Title Test Details Pattern Title
Expression
^(([+]\d{2}[ ][1-9]\d{0,2}[ ])|([0]\d{1,3}[-]))((\d{2}([ ]\d{2}){2})|(\d{3}([ ]\d{3})*([ ]\d{2})+))$
Description
Swedish phone numbers according to SIS standard
Matches
+46 8 123 456 78 | 08-123 456 78 | 0123-456 78
Non-Matches
+46 08-123 456 78 | 08 123 456 78 | 0123 456 78
Author Rating: Not yet rated. Martin Henningsson
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
Change page:   |    Displaying page 4 of 6 pages; Items 61 to 80

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