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 Pattern Title
Expression
^([a-zA-z\s]{4,32})$
Description
This is the simplest RegEx for validating someone's name. The name can contain only alphabets(in either case) & should be of minimum length 4 & maximum length 32. Only white spaces are allowed apart from alphabets.
Matches
some body | hey there | hello
Non-Matches
hi | hey 27 | hell?
Author Rating: The rating for this expression. Amit Gupta
Title Test Details Pattern Title
Expression
^([a-zA-z\s]{2,})$
Description
This pattern matches is for validating Names, Cities, States, Countries etc that require only alphabet inputs with white spaces. It requires atleast 2 characters & there's no limit on maximum number of characters.
Matches
Amit Gupta | Some Body
Non-Matches
A | Someplace23 | New-Jersey
Author Rating: Not yet rated. Amit Gupta
   Displaying page 1 of 1 pages; Items 1 to 2

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