Monday, March 12, 2012

Regular expression for special character in C#

Regex reg = new Regex("[~#%&;*{}\\:<>?/\"|$]+");
 if (reg.IsMatch(TxtBox.Text.Trim()))
{
//Error Msg
}

No comments:

Post a Comment

Seven steps to build and deploy SPFX web part to SharePoint

Install Node.JS Use this link to install Node.JS https://nodejs.org/en/ 2.        Install yeomen and gulp CMD>npm install –g y...