In C# I'm using this expression to remove all non-aphanum char
Code: Select all
Key=Regex.Replace(value.ToUpper(), "[\\W]", "");What can be the expression to do that ?
Thank for your help
Moderator: General Moderators
Code: Select all
Key=Regex.Replace(value.ToUpper(), "[\\W]", "");Code: Select all
try {
Key=Regex.Replace(value.ToUpper(), @"[^\w+\-@]", "");
} catch (ArgumentException ex) {
// Syntax error in the regular expression
}