107 regular expressions found in this category!
Displaying page
of
pages;
Items to
| Title |
Test
Details
Pattern Title
|
| Expression |
^([1-9]|[1-9]\d|100)$ |
| Description |
This pattern matches whole numbers 1-100. |
| Matches |
1 | 50 | 100 |
| Non-Matches |
0 | .5 | 101 |
| Author |
Rating:
Not yet rated.
Manny Ruiz
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(?!\u00a2) #Don't allow cent symbol
\p{Sc}? #optional unicode currency symbols
(?!0,?\d) #don't allow leading zero if 1 or more unit
(?:\d{1,3} # 1 to 3 digits
(?:([, .])\d{3})? # if there is a separator it must be followed by 3 digits
(?:\1\d{3})* # if the is more than two groups the same separtor must but used, it must be followed by 3 digits
|(?:\d+)) # more than 3 digit with no comma separator
((?!\1)[,.]\d{2})?$ # option cents |
| Description |
Internationally capable currency formats. It is NOT local aware. Should be modify for local specific validations.
More detail at http://blogs.regexadvice.com/mash/archive/2004/06/08/1246.aspx |
| Matches |
$9,876,543.21 | €9 876 543,21 | €9.876.543,21 |
| Non-Matches |
9.876.543.21 | 9,876,543,21 | 9 876 543 21 |
| Author |
Rating:
Not yet rated.
Michael Ash
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^\-?\(?([0-9]{0,3}(\,?[0-9]{3})*(\.?[0-9]*))\)?$ |
| Description |
Match a positive or negative decimal value with any precision and scale. Allows for left-padded zeroes, commas as group separator, negative sign (-) or parenthesis to indicate negative number. |
| Matches |
0.123 | (1234.123) | -01,200 |
| Non-Matches |
2.3.123 | 1,23.45 |
| Author |
Rating:
Not yet rated.
Rich Franzmeier
|
| 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 |
(^[0]{1}$|^[-]?[1-9]{1}\d*$) |
| Description |
This is a regular expression I used to validate negative and positive WHOLE numbers, including 0. |
| Matches |
0 | 123 | -123 |
| Non-Matches |
001 | -012 | -002 |
| Author |
Rating:
Not yet rated.
Les Portugal
|
| 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
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
|
Displaying page
of
pages;
Items to