regular expression: trying to include unlimited whitespaces for any words in ASP.NET C# -


[regularexpression(@"\s*[a-z\s]\s*\s*", errormessage = "please add  category name letters only")] 

this works fine if input words this...test test. if try this... test test test, errormessage implemented. thing don't know how many words going put in end user. there way unlimted whitespaces put in place? tell me how this? in advance. using vs2010

 ([a-za-z\s]{1,}) 

use regex above resolve problem. baically a-za-z match word case insensitive, , \s match whitespace character , {1,} tell combination needs have 1 or number of matches.

i hope helps


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -