Can anyone provide me with regex for validating string which only should not allow any special characters except backslash. I tried
var regexItem = new Regex("^[a-zA-Z0-9\\\ ]*$");
But it doesn't seem to work
You would have to escape the \ for regex as well as C# string by adding 4 \s for matching a single \.
\
\s