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
([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)|([0-9]+)
Description
This is just a very simple matcher for real numbers.
Matches
123.456 | .123 | 123
Non-Matches
. | apple | pear
Author Rating: The rating for this expression. Paul DeMarco
Title Test Details Pattern Title
Expression
^\d{1,5}(\.\d{1,2})?$
Description
validate a number 5 digits and 2 decimal places allowing zero
Matches
12345.67 | 0 | 0.1
Non-Matches
123456.78 | 123456.789 | .1
Author Rating: The rating for this expression. Paul Ashton
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: The rating for this expression. Miguel Gutierrez
Title Test Details Pattern Title
Expression
^([1-9]{0,1})([0-9]{1})(\.[0-9])?$
Description
Matches numbers 0 through 99.9 Allows only one preceding zero and does not require the decimal point
Matches
1 | 1.1 | 0.1
Non-Matches
01 | 01.1 | 0.10
Author Rating: The rating for this expression. Tim Macrina
Title Test Details Pattern Title
Expression
(^\d{3,5}\,\d{2}$)|(^\d{3,5}$)
Description
Expression to validate values to fields Decimal 5,2 or 5 numbers. values >=100,00 <=99999,99 100,00=100 5000,00 = 5000
Matches
100,00 | 100 | 99999,99
Non-Matches
99,99 | 999999 | 1,00
Author Rating: The rating for this expression. Felipe Albacete
Title Test Details One Numeric Digit
Expression
^\d$
Description
Matches exactly 1 numeric digit (0-9).
Matches
1 | 2 | 3
Non-Matches
a | 324 | num
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
(^[0-9]*[1-9]+[0-9]*\.[0-9]*$)|(^[0-9]*\.[0-9]*[1-9]+[0-9]*$)|(^[0-9]*[1-9]+[0-9]*$)
Description
Positive real number greater than zero.
Matches
0.01 | 010001.011010 | .234
Non-Matches
0.00 OR . | 010001.011010E | 1.234.5
Author Rating: The rating for this expression. will gunby
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: The rating for this expression. Brian Orrell
Title Test Details Pattern Title
Expression
^0$|^[1-9][0-9]*$|^[1-9][0-9]{0,2}(,[0-9]{3})$
Description
I need a pattern to match the whole number / integer (0-99999...), but also allow users to put comma in the thousand positions. This is what I got.
Matches
1234 | 0 | 12,345
Non-Matches
12,3245 | -1 | 1234.23
Author Rating: The rating for this expression. Harry Chou
Title Test Details Pattern Title
Expression
^[-]?([1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$
Description
This regular expression will match on a real / decimal / floating point / numeric string with no more than 2 digits past the decimal. The negative sign (-) is allowed. No leading zeroes or commas. It is based on a currency regular expression by Tom Persing.
Matches
123 | 123.54 | -.54
Non-Matches
123.543 | 0012 | 1,000.12
Author Rating: The rating for this expression. T H
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: The rating for this expression. sanjayanthan vijayakeerthi
Title Test Details Positive Integer
Expression
^\d+$
Description
Positive integer value.
Matches
123 | 10 | 54
Non-Matches
-54 | 54.234 | abc
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
^(0*100{1,1}\.?((?<=\.)0*)?%?$)|(^0*\d{0,2}\.?((?<=\.)\d*)?%?)$
Description
Percentage (From 0 to 100)
Matches
100% | 100 | 52.65%
Non-Matches
-1 | -1% | 100.1%
Author Rating: The rating for this expression. Andres Garcia
Title Test Details Pattern Title
Expression
^[-+]?[1-9]\d*\.?[0]*$
Description
This will check if a number is an integer. Positive integers are all the whole numbers greater than zero: 1, 2, 3, 4, 5, ... . Negative integers are all the opposites of whole numbers: -1, -2, -3,-4, -5, ... . Zero is not a whole number with either a positive or negative value, and is not an interger. Null or Empty values are not intergers.
Matches
10 | -10 | +10.00
Non-Matches
0 | -10.50 | 10.50
Author Rating: The rating for this expression. Chuck Scholton
Title Test Details Pattern Title
Expression
^[0-9]*(\.)?[0-9]+$
Description
it will check for the +ve decimal numbers
Matches
1 | 123 | 132.132
Non-Matches
1.2.2 | -123
Author Rating: The rating for this expression. himraj love
Title Test Details Pattern Title
Expression
^(\d|,)*\d*$
Description
matches 0 and all positive integers only. will accept comma formatting only.
Matches
1234 | 1,234 | 1,234,567
Non-Matches
1234.0 | -1234 | $1234
Author Rating: The rating for this expression. Donald Schneider
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: The rating for this expression. Martin Henningsson
Title Test Details Pattern Title
Expression
(^\d*\.?\d*[1-9]+\d*$)|(^[1-9]+\d*\.\d*$)
Description
Accepts only positive decimal values. Zero and negatvie numbers are non-matching. Allows zeros after last non-zero numeric value after decimal place for significant digits.
Matches
0.050 | 5.0000 | 5000
Non-Matches
0 | 0.0 | .0
Author Rating: Not yet rated. Bri Gipson
Title Test Details Pattern Title
Expression
^[+]?\d*$
Description
This re was used for set numbers only! Somente numeros s&#227;o requeridos!
Matches
0123456789 | 1234 | 1
Non-Matches
1.0?&amp; | a1 | 2a-
Author Rating: Not yet rated. Ramon Durães
Title Test Details Pattern Title
Expression
^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{0,2})?$
Description
From Author: DON'T USE THIS ONE. FIND MY OTHER ONE THAT BLOCKS LEADING ZEROS. My site also couldn't swallow the \d, so I switched to numeric ranges and it worked fine. KEYWORDS Currency Money Dollar
Matches
$0,234.50 | 0234.5 | 0,234.
Non-Matches
$1,23,50 | $123.123
Author Rating: Not yet rated. Tom Persing
Change page:   |    Displaying page 2 of 6 pages; Items 21 to 40

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