D
DotNetNewbie
Hi,
I want to parse a string, ONLY allowing alphanumeric characters and
also the underscore '_' and dash '-' characters.
Anything else in the string should be removed.
I think my regex is looking like:
^([\w\d_-])*$
Now if I have this code:
string username = "mrcsharpis_so_cool!!!";
How can I strip all the characters that I dont' want?
I want to parse a string, ONLY allowing alphanumeric characters and
also the underscore '_' and dash '-' characters.
Anything else in the string should be removed.
I think my regex is looking like:
^([\w\d_-])*$
Now if I have this code:
string username = "mrcsharpis_so_cool!!!";
How can I strip all the characters that I dont' want?