Hello,
I am trying to create a regular expression pattern in C#. The pattern can only allow for:
- letters
- numbers
- underscores
So far I am having little luck (i'm not good at RegEx). Here is what I have tried thus far:
// Create the regular expression
string pattern = @"\w+_";
Regex regex = new Regex(pattern);
// Compare a string against the regular expression
return regex.IsMatch(stringToTest);