0
Posted on 2:36 AM by Softminer and filed under

string English_pattern = "^([\u0000-\u007F]+)*$";
string Noallowed_pattern = "^[^*?<>:\\//|]*$";

string content = userFile.FileName;
if (!Regex.IsMatch(content, English_pattern) || !Regex.IsMatch(content, Noallowed_pattern))
{
//English
}
else
{
Non-English
}
0
Responses to ... Regex Validation for English strings in C#