Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
^[0-9]+$ |
Description |
Validate a string to see if it contains a number / integer |
Matches |
1234567890 | 1234567890 | 1234567890 |
Non-Matches |
http://none | http://none | http://none |
Author |
Rating:
Mr M
|
Title |
Test
Details
Pattern Title
|
Expression |
^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$ |
Description |
This pattern allows standard e-mail addresses (e.g. [email protected]), sub domains (e.g. [email protected]), the new two- and four-letter domains (e.g. [email protected] and [email protected]) and country codes (e.g. [email protected]). Also, this patter follows the Network Solutions standard length of 67 characters for top-level domains. The reason I allow numbers to be entered in the domain suffix is for future planning. If you do not want numbers to be able to be added as a domain suffix (e.g. [email protected]), simply delete the last two occurrences of "\d". |
Matches |
|
Non-Matches |
|
Author |
Rating:
Not yet rated.
Laurence O'Donnell
|
Title |
Test
Details
Pattern Title
|
Expression |
^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$ |
Description |
This RegEx requires a US phone number WITH area code. It is written to all users to enter whatever delimiters they want or no delimiters at all (i.e. 111-222-3333, or 111.222.3333, or (111) 222-3333, or 1112223333, etc...). |
Matches |
(111) 222-3333 | 1112223333 | 111-222-3333 |
Non-Matches |
11122223333 | 11112223333 | 11122233333 |
Author |
Rating:
Laurence O'Donnell
|
Title |
Test
Details
Pattern Title
|
Expression |
^(user=([a-z0-9]+,)*(([a-z0-9]+){1});)?(group=([a-z0-9]+,)*(([a-z0-9]+){1});)?(level=[0-9]+;)?$ |
Description |
This re was used for a security routine. The format is:
[user=name1,name2,...,nameN;][group=group1,group2,...,groupN;][level=number;]
Each component is optional, but they must appear the in order listed if applicable. |
Matches |
user=foo,bar,quux;group=manager,admin;level=100; | group=nobody;level=24; |
Non-Matches |
user=foo | blahh |
Author |
Rating:
Not yet rated.
Michael Scovetta
|
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 |
^[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 |
^[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:
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
foo |
Description |
The "hello world" of regular expressions, this will match any string with an instance of 'foo' in it. |
Matches |
foo |
Non-Matches |
bar |
Author |
Rating:
Steven Smith
|
Title |
Test
Details
Date With Slashes
|
Expression |
^\d{1,2}\/\d{1,2}\/\d{4}$ |
Description |
This regular expressions matches dates of the form XX/XX/YYYY where XX can be 1 or 2 digits long and YYYY is always 4 digits long. |
Matches |
4/1/2001 | 12/12/2001 | 55/5/3434 |
Non-Matches |
1/1/01 | 12 Jan 01 | 1-1-2001 |
Author |
Rating:
Steven Smith
|
Title |
Test
Details
Email - Overly Simple
|
Expression |
^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$ |
Description |
Simple email expression. Doesn't allow numbers in the domain name and doesn't allow for top level domains that are less than 2 or more than 3 letters (which is fine until they allow more). Doesn't handle multiple "." in the domain ( [email protected]). |
Matches |
|
Non-Matches |
|
Author |
Rating:
Steven Smith
|
Title |
Test
Details
Strongish Password
|
Expression |
^[a-zA-Z]\w{3,14}$ |
Description |
The password's first character must be a letter, it must contain at least 4 characters and no more than 15 characters and no characters other than letters, numbers and the underscore may be used |
Matches |
abcd | aBc45DSD_sdf | password |
Non-Matches |
afv | 1234 | reallylongpassword |
Author |
Rating:
Not yet rated.
Steven Smith
|
Title |
Test
Details
Alphanumeric
|
Expression |
^[a-zA-Z0-9]+$ |
Description |
Matches any alphanumeric string (no spaces). |
Matches |
10a | ABC | A3fg |
Non-Matches |
45.3 | this or that | $23 |
Author |
Rating:
Not yet rated.
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
^(\d{4}[- ]){3}\d{4}|\d{16}$ |
Description |
Credit card validator. Just checks that the format is either 16 numbers in groups of four separated by a "-" or a " " or nothing at all. |
Matches |
1234-1234-1234-1234 | 1234 1234 1234 1234 | 1234123412341234 |
Non-Matches |
Visa | 1234 | 123-1234-12345 |
Author |
Rating:
Not yet rated.
Steven Smith
|
Title |
Test
Details
US ZIP (5 or 5+4)
|
Expression |
^\d{5}$|^\d{5}-\d{4}$ |
Description |
This regular expression will match either a 5 digit ZIP code or a ZIP+4 code formatted as 5 digits, a hyphen, and another 4 digits. Other than that, this is just a really really long description of a regular expression that I'm using to test how my front page will look in the case where very long expression descriptions are used. |
Matches |
55555-5555 | 34564-3342 | 90210 |
Non-Matches |
434454444 | 645-32-2345 | abc |
Author |
Rating:
Steven Smith
|
Title |
Test
Details
ZIP+4 - XXXXX-XXXX
|
Expression |
^\d{5}-\d{4}$ |
Description |
Numeric and hyphen 5+4 ZIP code match for ZIP+4. |
Matches |
22222-3333 | 34545-2367 | 56334-2343 |
Non-Matches |
123456789 | A3B 4C5 | 55335 |
Author |
Rating:
Steven Smith
|
Displaying page
of
pages;
Items to