Displaying page
of
pages;
Items to
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{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$ |
Description |
This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9. |
Matches |
44240 | 44240-5555 | G3H 6A3 |
Non-Matches |
Ohio | abc | g3h6a3 |
Author |
Rating:
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$ |
Description |
GUID Tester. It tests SQL Server GUIDs, which are alphanumeric characters grouped 8-4-4-4-12 (with the dashes). Make sure they don't have the brackets around them before you check them and have fun! |
Matches |
4D28C5AD-6482-41CD-B84E-4573F384BB5C | B1E1282C-A35C-4D5A-BF8B-7A3A51D9E388 | 91036A4A-A0F4-43F0-8CD |
Non-Matches |
{B1E1282C-A35C-4D3A-BF8B-7A3A51D9E388} | AAAAAAAAAAAAAAAAA | B;E1282C-A35C-4D3A-BF8B-7A3A51D9E38 |
Author |
Rating:
Not yet rated.
James Bray
|
Title |
Test
Details
Pattern Title
|
Expression |
^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$ |
Description |
Matches US phone number format. 1 in the beginning is optional, area code is required, spaces or dashes can be used as optional divider between number groups. Also alphanumeric format is allowed after area code. |
Matches |
1-(123)-123-1234 | 123 123 1234 | 1-800-ALPHNUM |
Non-Matches |
1.123.123.1234 | (123)-1234-123 | 123-1234 |
Author |
Rating:
Igor Kravtsov
|
Title |
Test
Details
Pattern Title
|
Expression |
^[a-zA-Z0-9\s.\-]+$ |
Description |
ANY alphanumeric string with spaces, commas, dashes. |
Matches |
2222 Mock St. | 1 A St. | 555-1212 |
Non-Matches |
[A Street] | (3 A St.) | {34 C Ave.} |
Author |
Rating:
Not yet rated.
Mart Maasikas
|
Title |
Test
Details
Pattern Title
|
Expression |
^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$ |
Description |
This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9. |
Matches |
44240 | 44240-5555 | T2P 3C7 |
Non-Matches |
44240ddd | t44240-55 | t2p3c7 |
Author |
Rating:
Qing Jiang
|
Title |
Test
Details
Pattern Title
|
Expression |
^[a-zA-Z0-9\s.\-_']+$ |
Description |
Alphanumeric, hyphen apostrophe, comma dash spaces |
Matches |
dony d'gsa |
Non-Matches |
^[a-zA-Z0-9\s.\-_']+$ |
Author |
Rating:
Not yet rated.
Sonal Bordia
|
Title |
Test
Details
Pattern Title
|
Expression |
[^A-Za-z0-9_@\.]|@{2,}|\.{5,} |
Description |
Used as a username validation script requires:
1. Allows All Alphanumeric characters & underscore
2. Allows One "@" character
3. Allows Five "." periods
4. Rejects spaces
|
Matches |
user name | user#name | ..... |
Non-Matches |
|
Author |
Rating:
Not yet rated.
Theo Tillotson
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$ |
Description |
This is permit all decimal number, exclude all alphanumeric caracter |
Matches |
123456.123456 | 123456,123456 | 123456 |
Non-Matches |
123a.123 | 123a,123 | a |
Author |
Rating:
Not yet rated.
Hugues Gauthier
|
Title |
Test
Details
Pattern Title
|
Expression |
^([a-zA-Z0-9@*#]{8,15})$ |
Description |
Password matching expression. Match all alphanumeric character and predefined wild characters. Password must consists of at least 8 characters and not more than 15 characters.
|
Matches |
@12X*567 | 1#Zv96g@*Yfasd4 | #67jhgt@erd |
Non-Matches |
$12X*567 | 1#Zv_96 | +678jhgt@erd |
Author |
Rating:
lawson law
|
Title |
Test
Details
Pattern Title
|
Expression |
^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$ |
Description |
Checks domain names. This validates domains based on latest specifications (RFCs 952 and 1123 dealing with hostnames and RFC 1035 dealing with domain name system requirements) except that it only includes realistic fully-qualified domains: 1. requires at least one subdomain 2. allows shortest top-level domains like "ca", and "museum" as longest.
Other validation rules: 1. Labels/parts should be seperated by period. 2. Each label/part has maximum of 63 characters. 3. First and last character of label must be alphanumeric, other characters alphanumeric or hyphen. 4. Does not check maxlength of domain which incidentally is 253 characters of text (255 binary representation).
For a regular expression that matches ALL domains:
^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?$
|
Matches |
regexlib.com | this.is.a.museum | 3com.com |
Non-Matches |
notadomain-.com | helloworld.c | .oops.org |
Author |
Rating:
Remi Sabourin
|
Title |
Test
Details
Pattern Title
|
Expression |
(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{6,15})$ |
Description |
I built this expression to test a string in ASP for valid username and password constraints. It can be adapted for any number of scenerios. For instance in this case, we needed to ensure the username someone wanted was not all numbers or all letters and was 6-15 characters in length with no special characters. This expression tests negatively for all number cases, then all letter cases, and lastly tests for only alphanumeric characters in the required range. In other words: the match must be alphanumeric with at least one number, one letter, and be between 6-15 character in length. |
Matches |
C2dfeed | sporttrak1 | 11223a |
Non-Matches |
pookie | d34_fff | 123456 |
Author |
Rating:
Pete Lindquist
|
Title |
Test
Details
Email
|
Expression |
^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$ |
Description |
regex to validate email address
noteworthy:
(1) It allows usernames with 1 or 2 alphanum characters, or 3+ chars can have -._ in the middle. username may NOT start/end with -._ or any other non alphanumeric character.
(2) It allows heirarchical domain names (e.g. [email protected]). Similar -._ placement rules there.
(3) It allows 2-9 character alphabetic-only TLDs (that oughta cover museum and adnauseum :>).
(4) No IP email addresses though -- I wouldn't Want to accept that kind of address. |
Matches |
|
Non-Matches |
|
Author |
Rating:
Rob Eberhardt
|
Title |
Test
Details
Pattern Title
|
Expression |
[^A-Za-z0-9] |
Description |
To detect non-alphanumeric characters (for new username/password validation, for instance):
monkey(AT)greyledge.net
14-Oct-2003 11:26 |
Matches |
!@#$ | %^&* | '><?.," |
Non-Matches |
ABC123abc | abc123ABC | abc0132ABC |
Author |
Rating:
meet zorrer
|
Title |
Test
Details
Pattern Title
|
Expression |
\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$|^([0-9a-zA-Z'\.]{3,40})\*|([0-9a-zA-Z'\.]+)@([0-9a-zA-Z']+)\.([0-9a-zA-Z']+)$|([0-9a-zA-Z'\.]+)@([0-9a-zA-Z']+)\*+$|^$ |
Description |
This regular expression is for admitting wild card searches on Emails the wild card character is * and in my case will only allow to do the search when the * is place after the first 3 alphanumeric characters. If you need to modify this behavior change the {3,40} to {n,m} where n is how many characters before the * and m is the total number if characters. |
Matches |
|
Non-Matches |
j* | js* |
Author |
Rating:
Not yet rated.
Julio de la Yncera
|
Title |
Test
Details
Alphanumeric Expression
|
Expression |
^[a-zA-Z0-9\s]+$ |
Description |
Alphanumeric expression with spaces |
Matches |
123asd | 111 ee11e | 223 eeddd23 |
Non-Matches |
12' ggg | <>dfdg 444 | dfgdfg/dfgd |
Author |
Rating:
Vincent Faller
|
Title |
Test
Details
Enitity notation
|
Expression |
&
(?ni:\# # if a pound sign follow ampsand look for number
((x # if x follow pound sign accept hex value up to 5 digits
([\dA-F]){1,5}
)
| # otherwise accept decimal number between 0 - 1048575
(104857[0-5]
|10485[0-6]\d
|1048[0-4]\d\d
|104[0-7]\d{3}
|10[0-3]\d{4}
|0?\d{1,6})
)
| # no pound sign after ampersand
([A-Za-z\d.]{2,31}) #accept ASCII alphanumeric and period
); #end with semi-colon. |
Description |
This regex can be used to find general entites in HTML, XML and SGML files.
The entity can consist of
1) an ampsand (&)
2) followed by
(a) ASCII alphanumerics or period between 2 and 31 characters or
(b) a pound sign #
(i) followed by an x followed by a unicode value up to 5 hex digits or
(ii) followed by a decimal value from 0 to 1048575
3) ending with a semi-colon (;) |
Matches |
"e; | © | ' |
Non-Matches |
& | &#Hello; | &#Xray; |
Author |
Rating:
Michael Ash
|
Title |
Test
Details
Pattern Title
|
Expression |
^[a-zA-Z][a-zA-Z0-9_]+$ |
Description |
Validate that the string contains only alphanumeric characters or an underscore. The first character cannot be anything else than alphabetic character.
We use that to make sure the provided string can be a variable/entity name. |
Matches |
MyVariable | intWhatever | Blah_Blah |
Non-Matches |
1stVariable | 654 | _asdasd_234 |
Author |
Rating:
Not yet rated.
Alexandre Boudreault-Ferland
|
Title |
Test
Details
Pattern Title
|
Expression |
^[a-zA-Z0-9._-]+$ |
Description |
This is to check release names...
it only allowes alphanumeric and numeric chars , and also _ - and . |
Matches |
The.Cooler.2003.LIMITED.DVDRip.XViD-ALLiANCE | blaat.bleahz-GROUP | blaat_bleahz-GROUP |
Non-Matches |
The Cooler 2003 LIMITED DVDRip XViD-ALLiANCE | blaat~bleahz@GROUP |
Author |
Rating:
Rodrigo Antonio
|
Title |
Test
Details
Pattern Title
|
Expression |
^(X(-|\.)?0?\d{7}(-|\.)?[A-Z]|[A-Z](-|\.)?\d{7}(-|\.)?[0-9A-Z]|\d{8}(-|\.)?[A-Z])$ |
Description |
Matches Spanish CIF, NIF and NIE formats. Recognises separation of letters with the hyphen or period.
Format CIF: [1 letter][7 numbers][1 number or letter]
Format NIF: [8 numbers][1 letter]
Format NIE: X[possible 0][7 numbers][1 letter]
Note that this expression does not check for the validity of the NIF/CIF/NIE... there are some control characters in there and I don't know how they work.
Generally I always strip out any non-alphanumeric characters (hyphens, periods, etc.) and convert to upper case before checking validity and before saving to data storage.
Please post improvements or errors if you find them! |
Matches |
X01343567-D | B-6116622G | 43544122-R |
Non-Matches |
43.544.122-R |
Author |
Rating:
Not yet rated.
Greg Robbins
|
Displaying page
of
pages;
Items to