107 regular expressions found in this category!
Displaying page
of
pages;
Items to
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 |
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 |
(^[+]?\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 |
(\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 |
^\-?[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 |
(^\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*\.?\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 |
^\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 |
^[-]?([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:
Not yet rated.
T H
|
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
|
Displaying page
of
pages;
Items to