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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 5
Title Test Details Local/UNC Path Discriminator
Expression
^[a-zA-Z]\:\\.*|^\\\\.*
Description
Useful for determining whether a string constitutes a valid local or UNC path.
Matches
\\mypath\mypath1\myfile.aaa, C:\mypath\mypath\mypath, \\otherpath\otherpath, D:\somepath\somefile.file
Non-Matches
http://www.mysite.com, \\\badpath\badpath, X::\\badpath
Author Rating: The rating for this expression. Keith Stacy
Title Test Details Password Rule
Expression
^(?=.*\d)(?=.*[a-zA-Z])(?!.*\s).{6,12}$
Description
Tests that a password contains between 6 and 12 characters, and contains at least one number.
Matches
Password1, pAsSwOrD23
Non-Matches
pwd, ThisPasswordIsTooLong3423423
Author Rating: The rating for this expression. Keith Stacy
Title Test Details Screen name
Expression
^([\w][\w\-_\u0020]{4,18}[\w])$
Description
Tests that a screen name begins and ends with an alphanumeric, and otherwise use alphanumeric characters, hyphens, and underscores. Dictates length between 6 and 20 characters
Matches
Screen Name, screen_name1, 222_screen
Non-Matches
name, wayTooLong_ScreenName, *Screen&Name@!
Author Rating: The rating for this expression. Keith Stacy
Title Test Details Gender Descriptor
Expression
^(?:m|M|male|Male|f|F|female|Female)$
Description
Classic gender descriptor regex.
Matches
F, M, female, male, Female, Male
Non-Matches
mail, femail, a, z,
Author Rating: Not yet rated. Keith Stacy
Title Test Details North American Phone Number Pattern
Expression
^\(\d{3}\)\s?|\d{3}(\.|-|\s)?)\d{3}(\.|-|\s)?\d{4}$
Description
Checks the format of a North American phone number with area code.
Matches
(999) 999-9999, 999.999.9999, 999-999-9999,
Non-Matches
999,999,9999, 999-9999
Author Rating: Not yet rated. Keith Stacy
   Displaying page 1 of 1 pages; Items 1 to 5

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