Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello every one i need a validation that can only validate to character and white space.. no mater how much space and character in textbox

i use this regex validation below. but it`s only allow one space between two words but don`t allow the third space for third word

C#
([A-Za-z])+( [A-Za-z]+)
Posted

1 solution

Try this:
^[a-zA-Z]+(\s+[a-zA-Z]+)*$
 
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