Monday, August 22, 2005

Regular Expression to check Posting or Channel name

Few weeks back, Stefan has posted a function which can be used to validate the name of a posting or channel. I had a similar requirement, but wanted to have it as a single regular expression so that it can be easily used with RegularExpressionValidators.

Regular expression -

^(([a-zA-Z0-9 ()_\-]+(\.(?!\.)))*)[^/.]$

Also it is required to add a RequiredFieldValidator to check blank / whitespaces.

0 Comments:

Post a Comment

<< Home