Click here to Skip to main content
16,017,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need regex with space between words without digits and without any special characters except dot if client enters their short name and Min,Max value{3,20} -

Expected value:--
----------------------
S.K THAKUR-----OK(dots allowed)
Saurav --------OK(MORE than 3 char,Not holding digits/spl char without dot)
Saurav kumar Thakur---OK(space allowed between worrds

Un-Expected value:--
----------------------

Saurav32@---Not OK (hold digits and spl char)
Sauravkumar@---Not OK (hold spl char)
3Saurav-----Not OK (hold digits)
sa_urav----Not OK (includes spl char underscore)
Posted
Updated 19-Jul-13 21:51pm
v2

Try:
[a-zA-Z\.\s]{3,}
 
Share this answer
 
i have solved it works fine:
/^[a-zA-Z\.\s]{3,20}$/;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900