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 2
Title Test Details US Phone Number
Expression
^(\{1}[2-9]{1}[0-9]{2}\){1}[ ]?[2-9]{1}[0-9]{2}(-| )?[0-9]{4}|[2-9]{1}[0-9]{2}[ ]{1}[2-9]{1}[0-9]{2}[ ]{1}[0-9]{4}|[2-9]{1}[0-9]{2}[2-9]{1}[0-9]{6}|[2-9]{1}[0-9]{2}-{1}[2-9]{1}[0-9]{2}-{1}[0-9]{4}){1}$
Description
This should be pretty complete phone number pattern. I use [0-9] when most people seem to use \d because it is easier for me to read.
Matches
(233) 233-0000,2332330000,233-233-0000,233 233 0000, etc.
Non-Matches
(233)-222-0000,(122)233-000, etc.
Author Rating: Not yet rated. Jon Turlington
Title Test Details First Given Name
Expression
^((Sir|Dr.|Mr.|Mrs.|Ms.|Rev.){1}[ ]?)?([A-Z]{1}[.]{1}([A-Z]{1}[.]{1})?|[A-Z]{1}[a-z]{1,}|[A-Z]{1}[a-z]{1,}[-]{1}[A-Z]{1}[a-z]{1,}|[A-Z]{1}[a-z]{0,}[ ]{1}[A-Z]{1}[a-z]{0,}){1}$
Description
This will allow to check to make sure the string is a First or Given Name and it can be initials and it can include a prefix.
Matches
Mr. Jon, Mr.Jon,Jon,J.D., J D, Mr. Jean-Guy etc.
Non-Matches
JD, Mr Jon, MrJon, etc.
Author Rating: Not yet rated. Jon Turlington
   Displaying page 1 of 1 pages; Items 1 to 2

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