RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Browse Expressions by Category

173 regular expressions found in this category!

Expressions in category: Misc

Change page:   |    Displaying page 9 of 9 pages; Items 161 to 173
Title Test Details Pattern Title
Expression
(?-i:\b\p{Lu}+\b)
Description
Matches uppercase unicode alpha characters
Matches
ABCDE | ??G?? | Æ
Non-Matches
abc | aß?d | æ
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
^[a-zA-Z0-9]{1,20}$
Description
Matches
e3 | wee | w4
Non-Matches
-4
Author Rating: Not yet rated. eddie xia
Title Test Details Pattern Title
Expression
^[\u0081-\uFFFF]{1,}$
Description
Double byte charactors validator. The rule applies to double byte charactor input validation.
Matches
??? | ????
Non-Matches
ABC | ;&#F;
Author Rating: Not yet rated. Max Lu
Title Test Details Pattern Title
Expression
^\s*(((\d*\.?\d*[0-9]+\d*)|([0-9]+\d*\.\d*) )\s*[xX]\s*){2}((\d*\.?\d*[0-9]+\d*)|([0-9]+\d*\.\d*))\s*$
Description
This validates Length times Width times Height measurements, which consists of 3 whole or decimal numbers separated by an x.
Matches
1.1 x 4.35 x 5.0 | 1 x 2 x 3 | 4.75 x 300.25 x 0
Non-Matches
z.56 x 6 x 7 | 1 xx 2 x 3 | 1 by 2 by 3
Author Rating: Not yet rated. Rod Early
Title Test Details Pattern Title
Expression
^[a-z]+[0-9]*[a-z]+$
Description
Matches
aaa111bbb
Non-Matches
111aaa
Author Rating: Not yet rated. Nitesh Waghela
Title Test Details Pattern Title
Expression
^(([a-z])+.)+[A-Z]([a-z])+$
Description
This matches Java class names such as "com.test.Test". It's being used within an XML Schema to validate classname as specified in XML documents.
Matches
com.test.Test | com.Test
Non-Matches
com.test.test | com.test.TEst | Com.test.Test
Author Rating: Not yet rated. Matt Biggin
Title Test Details Pattern Title
Expression
\p{N}
Description
Matches numbers. Note: the second match (?) and the second non-match (IV) are not the same. I cover this in more detail here http://blogs.regexadvice.com/mash/archive/2004/04/17/988.aspx
Matches
123890 | ? | ½
Non-Matches
AAABB | IV | Ten
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
^((4\d{3})|(5[1-5]\d{2}))(-?|\040?)(\d{4}(-?|\040?)){3}|^(3[4,7]\d{2})(-?|\040?)\d{6}(-?|\040?)\d{5}
Description
Credit card validator for AMEX, VISA, MasterCard only. Allows spaces, dashes, or no separator between digit groups according to the layout (4-6-5 for AMEX, 4-4-4-4 for Visa and Mastercard)
Matches
3711-078176-01234 | 4123 5123 6123 7123 | 5123412361237123
Non-Matches
3711-4123-5123-6112
Author Rating: Not yet rated. Rick Spiewak
Title Test Details Pattern Title
Expression
(?-i:\b\p{Ll}+\b)
Description
This pattern matches lower-case letters
Matches
test | holã | p
Non-Matches
Test | 123 | ?S
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
(.*\.([wW][mM][aA])|([mM][pP][3])$)
Description
Matches a file name to be either a .wma or .mp3 file. This can be used to check file uploads to make sure they are of a certain type. Substitute letters where appropriate for specific file types. To include more simply add logical 'or' (|) operator and append.
Matches
thisfile.mp3 | tH@tfile.wma
Non-Matches
whatever.exe | somethingelse.mpa | thisagain.wm3
Author Rating: Not yet rated. Pete Samwel
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: Not yet rated. Andrew Deren
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: Not yet rated. Mike Stancombe
Title Test Details Pattern Title
Expression
^(\d{5}((|-)-\d{4})?)|([A-Za-z]\d[A-Za-z][\s\.\-]?(|-)\d[A-Za-z]\d)|[A-Za-z]{1,2}\d{1,2}[A-Za-z]? \d[A-Za-z]{2}$
Description
Allows Canadian, American and UK postal/zip codes. Allowing hyphens, periods, or spaces to separate.
Matches
N9B.1Y8 | 90210-1234 | NE21 6EQ
Non-Matches
NN8 Y83
Author Rating: Not yet rated. Russell Anderson
Change page:   |    Displaying page 9 of 9 pages; Items 161 to 173

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials