173 regular expressions found in this category!
Displaying page
of
pages;
Items to
| Title |
Test
Details
Roman numerials
|
| Expression |
^(?i:(?=[MDCLXVI])((M{0,3})((C[DM])|(D?C{0,3}))?((X[LC])|(L?XX{0,2})|L)?((I[VX])|(V?(II{0,2}))|V)?))$ |
| Description |
This RE validates alpha characters that evaluate to Roman numerials, ranging from 1(I) - 3999(MMMCMXCIX). Not case sensitive. |
| Matches |
III | xiv | MCMXCIX |
| Non-Matches |
iiV | MCCM | XXXX |
| Author |
Rating:
Michael Ash
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^[a-zA-Z_][a-zA-Z0-9_]*$ |
| Description |
Matches variable names/identifier from C# (and most other languages) |
| Matches |
VariableName | i | Some_Value_3 |
| Non-Matches |
3ID | Hello World |
| Author |
Rating:
Andrew Deren
|
| Title |
Test
Details
Pattern Title
|
| Expression |
\u00AE |
| Description |
Matches the registered trademark (®). Pretty simple, yet I dont think existed on RegExLib before. |
| Matches |
® |
| Non-Matches |
anything else |
| Author |
Rating:
Roman Lukyanenko
|
| 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 |
^\(?082|083|084|072\)?[\s-]?[\d]{3}[\s-]?[\d]{4}$ |
| Description |
I modified the existing phone number regex for another user looking to only allow 082, 083, 084, or 072 exchanges. Written by Jason Gaylord |
| Matches |
082-131-5555 | 083-145-654 | 072 555 1212 |
| Non-Matches |
131-253-4564 | 5551212 | 800 555 1212 |
| Author |
Rating:
Jason N. Gaylord
|
| 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 |
^[0-9]{2}[-][0-9]{2}[-][0-9]{2}$ |
| Description |
Validates a UK Bank Sort code |
| Matches |
09-01-29 | 05-06-25 |
| Non-Matches |
090125 |
| Author |
Rating:
Richard Slade
|
| Title |
Test
Details
Pattern Title
|
| Expression |
\d{2}.?\d{3}.?\d{3}/?\d{4}-?\d{2} |
| Description |
This regular expressions matches CNPJ number. CNPJ is a Registration Number of Brazilian Companies. |
| Matches |
00.000.000/0000-00 | 00000000000000 |
| Non-Matches |
00-000-000-000-00 | AA.AAA.AAA/AAAA-AA |
| Author |
Rating:
Gabriel Fróes
|
| Title |
Test
Details
Pattern Title
|
| Expression |
\p{IsBasicLatin} |
| Description |
Matches any character is the Basic Latin Unicode Range \U0000-U007F (Ascii 0-127)
I've blogged about this and other expressions here http://blogs.regexadvice.com/mash/archive/2004/04/17/988.aspx |
| Matches |
ABCxyz | 123 | +-= |
| Non-Matches |
? | ? | ? |
| Author |
Rating:
Michael Ash
|
| 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 |
(NOT)?(\s*\(*)\s*(\w+)\s*(=|<>|<|>|LIKE|IN)\s*(\(([^\)]*)\)|'([^']*)'|(-?\d*\.?\d+))(\s*\)*\s*)(AND|OR)? |
| Description |
Heres my sql clause parser regexp for recordset filtering. Does recursive query parsing all by its self. Only problem I cant figure is how to match comma separated lists of quoted strings. Tell me if you figure out how!
The unicodes in the re was put in by the entry form please replace them with their ascii equivalents to use it. |
| Matches |
Aeroplane LIKE 767 | Movie LIKE 'Star' AND NOT Movie LIKE 'Trek' | Number IN (1,2,3,4,5) |
| Non-Matches |
Hello there | A=EXCELLENT OR | B!=POOR |
| Author |
Rating:
Joseph Warwick
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(^\d{5}-\d{3}|^\d{2}.\d{3}-\d{3}|\d{8}) |
| Description |
Validar o do CEP Brasileiro com 8 posicoes podendo usar
mascara . e - ou somente numeros |
| Matches |
12.345-678 | 12345-678 | 12345678 |
| Non-Matches |
12.345678 | 12345-1 | 123 |
| Author |
Rating:
Fernando Cerqueira
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(.|\n){0,16}$ |
| Description |
Limit Length - limit the length of a text box or other area to contain any character plus new line |
| Matches |
shorter than max |
| Non-Matches |
string longer than max |
| Author |
Rating:
David Yack
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(?s)(?:\e\[(?:(\d+);?)*([A-Za-z])(.*?))(?=\e\[|\z) |
| Description |
This expression will match all of the commands(escape codes) used in ANSI files. These are what were used to create the colors/blocks on BBS's for those of us that once dialed into them.
http://www.wikipedia.org/wiki/ANSI_escape_code has a reference for ANSI escape codes.
http://idledreams.net/lordscarlet/posts/153.aspx shows an example of the engine I have created surrounding the expression |
| Matches |
[32mHello | [1;35mTest | [2J |
| Non-Matches |
abc |
| Author |
Rating:
Doug Moore
|
| 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 |
^[A-Za-z]{6}[0-9LMNPQRSTUV]{2}[A-Za-z]{1}[0-9LMNPQRSTUV]{2}[A-Za-z]{1}[0-9LMNPQRSTUV]{3}[A
-Za-z]{1}$ |
| Description |
Check italian fiscal code (codice fiscale) with "OMOCODIA" control |
| Matches |
BTTNDR78R06A79QU |
| Non-Matches |
BTTNDR78R06A79AU |
| Author |
Rating:
andrea mele
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^[{|\(]?[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}[\)|}]?$ |
| Description |
Specifier Format of Guid Values that this RegEx supports: 32 digits: [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] 32 digits separated by hyphens: [xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx] 32 digits separated by hyphens, enclosed in brackets: [{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}] 32 digits separated by hyphens, enclosed in parentheses: [(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)] |
| Matches |
914D226A-2F5B-4944-934D-96BBE6571977 | {914D226A-2F5B-4944-934D-96BBE6571977} |
| Non-Matches |
914D226A-2F5B-4944-XXXX-96BBE6571977 | {914D226A-2F5B-4944-XXXX-96BBE6571977} |
| Author |
Rating:
Nicholas Berardi
|
Displaying page
of
pages;
Items to