173 regular expressions found in this category!
Displaying page
of
pages;
Items to
| Title |
Test
Details
Pattern Title
|
| Expression |
^[a-zA-Z][0-9][a-zA-Z]\s?[0-9][a-zA-Z][0-9]$ |
| Description |
Match Canadia Zip Code. You can have a space in the middle Like T2P 3C7, or no space like T2P3C7 |
| Matches |
T2p 3c7 | T3P3c7 | T2P 3C7 |
| Non-Matches |
123456 | 3C7T2P | 11T21RWW |
| Author |
Rating:
Qing Jiang
|
| Title |
Test
Details
Pattern Title
|
| Expression |
\u221E |
| Description |
Matches infinity symbol. Pretty simple, yet I dont think existed on RegExLib before. |
| Matches |
8 |
| Non-Matches |
anything else |
| Author |
Rating:
Roman Lukyanenko
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^[^']*$ |
| Description |
This one matches all strings that do not contain the single quotation mark ('). |
| Matches |
asljas | %/&89uhuhadjkh | "hi there!" |
| Non-Matches |
'hi there!' | It's 9 o'clock | ''''' |
| Author |
Rating:
Peter Friese
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$ |
| Description |
Validates swedish zipcodes (postnr) with or without space between groups. With leading s- or not. Can be disconnected by removing ''(s-|S-){0,1}''. |
| Matches |
12345 | 932 68 | S-621 46 |
| Non-Matches |
5367 | 425611 | 31 545 |
| Author |
Rating:
Tommy Ullberg
|
| 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:
Michael Scovetta
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(\/\/-->\s*)?<\/?SCRIPT([^>]*)>(\s*<!--\s)? |
| Description |
Can be used to remove
&amp;lt;SCRIPT language=&amp;quot;JavaScript&amp;quot;&amp;gt;
&amp;lt;!--
//--&amp;gt;
&amp;lt;/SCRIPT&amp;gt;
from embeded javascript
Should be used as case insensitive |
| Matches |
<SCRIPT language="JavaScript"> <!-- //--> </SCRIPT> | <SCRIPT l |
| Non-Matches |
<!-- //--> |
| Author |
Rating:
Mike t
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$) |
| Description |
Regular expression to evaluate dutch-style phone numbers. Possible example prefixes: +31, +31(0), (+31)(0), 0, 0031
followed by 9 numbers (which can contain a space or -). |
| Matches |
+31235256677 | +31(0)235256677 | 023-5256677 |
| Non-Matches |
+3123525667788999 | 3123525667788 | 232-2566778 |
| Author |
Rating:
Jon van Leuven
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$ |
| Description |
Checks for a valid windows file name (Must be used with the case-insensitive option
Checks that the file has at lease one char, does not contain any invalid characters and does not have a reserved word as a file name.
"If you see a &quot; in the regex replace it with a " character" |
| Matches |
test.txt | test.jpg.txt | a&b c.bmp |
| Non-Matches |
CON | .pdf | test:2.pdf |
| Author |
Rating:
Andre Van Der Merwe
|
| Title |
Test
Details
Pattern Title
|
| Expression |
<[iI][mM][gG]([^>]*[^/>]) |
| Description |
simple little RegExp to get the IMG tag from HTML |
| Matches |
<img src="abc.jpg"> | <img src="abc.jpg"/> | <ImG src="abc.j |
| Non-Matches |
none |
| Author |
Rating:
Asim Goheer
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(\{|\[|\().+(\}|\]|\)).+$ |
| Description |
Matches "clan" nicks/names. |
| Matches |
{CLaN}nick | [Clan]Nick | (Clan)Nick |
| Non-Matches |
Nick |
| Author |
Rating:
Jag fire
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(^(4|5)\d{3}-?\d{4}-?\d{4}-?\d{4}|(4|5)\d{15})|(^(6011)-?\d{4}-?\d{4}-?\d{4}|(6011)-?\d{12})|(^((3\d{3}))-\d{6}-\d{5}|^((3\d{14}))) |
| Description |
This provides an expression to calidate the four major credit cards. It can be easily broken up to use for a specific type of card. It does not validate the number being a potential real number, only in the correct format. |
| Matches |
4111-1234-1234-1234 | 6011123412341234 | 3711-123456-12345 |
| Non-Matches |
1234567890123456 | 4111-123-1234-1234 | 412-1234-1234-1234 |
| Author |
Rating:
Chris Love
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^([A-Za-z]\d[A-Za-z][-]?\d[A-Za-z]\d) |
| Description |
Regular expression to match a canadian postal code where it matches a string with or without the hyphen and in upercase or lowercase |
| Matches |
a1a-1a1 | A1A1A1 |
| Non-Matches |
1a1-a1a | aaa-aaa | 111-111 |
| Author |
Rating:
Rico lour
|
| Title |
Test
Details
Pattern Title
|
| Expression |
<[^>\s]*\bauthor\b[^>]*> |
| Description |
This expression will match the corresponding XML/HTML elements opening and closing tags. Useful to handle documents fragments, without loading an XML DOM.
|
| Matches |
<author name="Daniel"> | </sch:author> | <pp:author name="Daniel" |
| Non-Matches |
<other> | </authors> | <work>author</work> |
| Author |
Rating:
Daniel Cazzulino
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(\d*)'*-*(\d*)/*(\d*)" |
| Description |
This regular expression is for parsing feet and inches measurements. |
| Matches |
5'-3/16" | 1'-2" | 5/16" |
| Non-Matches |
1 3/16 |
| Author |
Rating:
Felix Osegueda
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^\(\d{1,2}(\s\d{1,2}){1,2}\)\s(\d{1,2}(\s\d{1,2}){1,2})((-(\d{1,4})){0,1})$ |
| Description |
Meets german norm-standard: DIN 5008: 1996-05 for telephone numbers |
| Matches |
(0 34 56) 34 56 67 | (03 45) 5 67 67 | (0 45) 2 33 45-45 |
| Non-Matches |
(2345) 34 34 | (0 56) 456 456 | (3 45) 2 34-45678 |
| Author |
Rating:
Gerald Martin
|
| 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 |
^0(5[012345678]|6[47]){1}(\-)?[^0\D]{1}\d{5}$ |
| Description |
Regular Expression that validate Cellular phone in israel. |
| Matches |
050-346634 | 058633633 | 064-228226 |
| Non-Matches |
059-336622 | 064-022663 | 0545454545 |
| Author |
Rating:
Al Val
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(^.+\|+[A-Za-z]) |
| Description |
Anti-Spam/Spam stopper: Detects all words with the character "|" instead of an "l" or "1" |
| Matches |
| comp|eted | fu|l-sized | annua|ly |
| Non-Matches |
www.fireflyfx.net | www.trustmusic.nl |
| Author |
Rating:
Louis Ostendorf
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(eth[0-9]$)|(^eth[0-9]:[1-9]$) |
| Description |
regex to validate unix device names (linux). useful for scripts using ifconfig or stuff |
| Matches |
eth0 | eth0:4 | eth4:9 |
| Non-Matches |
eth0: | eth0:0 | eth0:1d |
| Author |
Rating:
Joey Brunner
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^[A-Z]{2}[0-9]{6}[A-DFM]{1}$ |
| Description |
UK National Insurance Number (NINO) validation. (The following modifications have been made: Only A to D are permitted as the last letter, and all letters should be in uppercase. For temporary numbers F and M are permitted for female and male holders.) |
| Matches |
AB123456D | AB123456F | AB123456M |
| Non-Matches |
AB123456E | ab123456d |
| Author |
Rating:
Peter Whyte
|
Displaying page
of
pages;
Items to