173 regular expressions found in this category!
Displaying page
of
pages;
Items to
| Title |
Test
Details
Pattern Title
|
| Expression |
\u20AC |
| Description |
Matches the Euro sign. 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 |
^(([a-zA-Z]:|\\)\\)?(((\.)|(\.\.)|([^\\/:\*\?"\|<>\. ](([^\\/:\*\?"\|<>\. ])|([^\\/:\*\?"\|<>]*[^\\/:\*\?"\|<>\. ]))?))\\)*[^\\/:\*\?"\|<>\. ](([^\\/:\*\?"\|<>\. ])|([^\\/:\*\?"\|<>]*[^\\/:\*\?"\|<>\. ]))?$ |
| Description |
File Name Validator. Validates both UNC (\\server\share\file) and regular MS path (c:\file). |
| Matches |
File.txt | c:\Blah\..\.\Blah Blah.Blah\File.txt | \\server\share\file.txt |
| Non-Matches |
File.txt | c:\.File.txt | c:\.\.Blah\File.txt |
| Author |
Rating:
Dmitry Borysov
|
| Title |
Test
Details
Pattern Title
|
| Expression |
\u2122 |
| Description |
Matches the ™ symbol. 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 |
^[{|\(]?[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
|
| Title |
Test
Details
Pattern Title
|
| Expression |
,(?!(?<=(?:^|,)\s*\x22(?:[^\x22]|\x22\x22|\\\x22)*,)(?:[^\x22]|\x22\x22|\\\x22)*\x22\s*(?:,|$)) |
| Description |
This regex can be used to split the values of a comma delimitted list. List elements may be quoted, unquoted or empty. Commas inside a pair of quotation marks are not matched. |
| Matches |
1,,3""but, wait",5 | 1,2,3 |
| Non-Matches |
"Test""a,b,c,d""ing" | no comma | semi; colon |
| Author |
Rating:
Michael Ash
|
| Title |
Test
Details
Pattern Title
|
| Expression |
\u00A5 |
| Description |
Matches the Yen sign. 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 |
^\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 |
^[1-9]{1}[0-9]{3} ?[A-Z]{2}$ |
| Description |
Postcode check for Netherlands |
| Matches |
1234 AB | 1234AB |
| Non-Matches |
123AB | 1234AAA |
| Author |
Rating:
Henk de Vries
|
| 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 |
\{CHBLOCK\:(.*?\}) |
| Description |
Litle regexp for my portal engie. Only cut the {CHBLOCK:'modulename'} item |
| Matches |
{CHBLOCK:sdgs} | {CHBLOCK:sdgs}sdg{CHBLOCK:sdgs} |
| Non-Matches |
{CHBLOCK} | {CHBLOCK:sdgs |
| Author |
Rating:
János Cservenák
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(^([1-3]{1}[0-9]{0,}(\.[0-9]{1})?|0(\.[0-9]{1})?|[4]{1}[0-9]{0,}(\.[0]{1})?|5(\.[5]{1}))$) |
| Description |
GPA (Grade Point Average) expression. Validates the standars 0.0 thru 4.0 and also accepts 5.5 -- which I use as unknown. |
| Matches |
0.0 | 4.0 | 5.5 |
| Non-Matches |
0. | .9 | 4.1 |
| Author |
Rating:
Jay Wasser Jr
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(V-|I-)?[0-9]{4}$ |
| Description |
Postcode check for Italy (including possible Vatican/Italy indications) |
| Matches |
1234 | V-1234 |
| Non-Matches |
12345 |
| Author |
Rating:
Henk de Vries
|
| Title |
Test
Details
Pattern Title
|
| Expression |
</?(\w+)(\s+\w+=(\w+|"[^"]*"|'[^']*'))*> |
| Description |
Finds any HTML tag and sub-matches properties weather it has an apposterphee, quote, or no quote/apposterphee
|
| Matches |
<TD> | <TD bgColor="FFFFFF"> | </TD> |
| Non-Matches |
No Tag Here ... |
| Author |
Rating:
Lewis Moten
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^[+]447\d{9}$ |
| Description |
Validates a UK mobile phone number in International format |
| Matches |
+447974405524 | +447932205578 |
| Non-Matches |
447974407726 | +4407974407724 |
| Author |
Rating:
Richard Slade
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^([\(]{1}[0-9]{3}[\)]{1}[ |\-]{0,1}|^[0-9]{3}[\-| ])?[0-9]{3}(\-| ){1}[0-9]{4}$ |
| Description |
Validates US phone numbers. Phone number can be delimited with dashes or spaces. Area code can optionally include parentheses. To optionally validate area codes, try this expression.
^([\(]{1}[0-9]{3}[\)]{1}[ |\-]{0,1}|^[0-9]{3}[\-| ])?[0-9]{3}(\-| ){1}[0-9]{4}$ |
| Matches |
(111) 223-2332 | (222)233-2332 | 232-323-3233 |
| Non-Matches |
(ddd) 223-2332 | 222-232/2333 | 322-3223-222 |
| Author |
Rating:
gabe g
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$ |
| Description |
This pattern match italian fiscal code (codice fiscale). |
| Matches |
SPGGRG73A02E625S | czzdll74h18f205w |
| Non-Matches |
SP6FFFF3A02E625S | czzdll74h18f205 |
| Author |
Rating:
Giorgio Spugnesi
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(at\s)(?<fullClassName>.+)(\.)(?<methodName>[^\.]*)(\()(?<parameters>[^\)]*)(\))((\sin\s)(?<fileName>.+)(:line )(?<lineNumber>[\d]*))? |
| Description |
Just a simple regExp to parse the stack trace. Developed when using the exception block from MS, coz they only showed the stack all bunched together. Could be used as follows:
[C#]
string regExParams = @"(at\s)(?<fullClassName>.+)(\.)(?<methodName>[^\.]*)(\()(?<parameters>[^\)]*)(\))((\sin\s)(?<fileName>.+)(:line )(?<lineNumber>[\d]*))?";
Regex re = new System.Text.RegularExpressions.Regex(regExParams,RegexOptions.Compiled);
MatchCollection mtc;
mtc = re.Matches(System.Environment.StackTrace);
foreach(Match mt in mtc)
{
MessageBox.Show(mt.Result("${fullClassName}"));
MessageBox.Show(mt.Result("${methodName}"));
MessageBox.Show(mt.Result("${parameters}"));
MessageBox.Show(mt.Result("${fileName}"));
MessageBox.Show(mt.Result("${lineNumber}"));
}
Seems to work well, but use at your own peril!!
Feel free to use and enhance (there's probably a lot that could be done, like getting parameters individually(?), etc) |
| Matches |
at System.IO.__Error.WinIOError(Int32 errorCode, String str) | at ExceptionManagementQuickStartSampl |
| Non-Matches |
ExceptionManagementQuickStartSamples.Form1.DoLogon(String userName, String password) in c:\program f |
| Author |
Rating:
Mike Stancombe
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^([a-zA-Z.\s']{1,50})$ |
| Description |
This is just a regular special char expression used to get the hax0rs off your back (hopefully). You can use this for regular open name checking if you wanted. It only fails on the insert of anything other than a-z, A-Z, and ' or whitespace. I'm open to suggestions, but try to email them to me as well as posting them to help others. Thanks. |
| Matches |
Jon M. Doe | Tim L. O'Doul | ...''''' |
| Non-Matches |
Doe, Jon | <>,;:"?/ | %\$#@! |
| Author |
Rating:
John Smart
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(?(^00000(|-0000))|(\d{5}(|-\d{4})))$ |
| Description |
US zip code expression that disallows 00000 or 00000-0000 for either ZIP or ZIP+4. Great for web site validation. |
| Matches |
12345 | 12345-6789 |
| Non-Matches |
00000 | 00000-0000 | a4650-465s |
| Author |
Rating:
Paul Duncan
|
Displaying page
of
pages;
Items to