T
Tim Conner
I wrote the following function to test a string for
characters from a to z and the "_" character :
public static bool IsAlpha( char Value )
{
Regex regExp = new Regex("^[a-zA-Z_]*$");
if (regExp.IsMatch( Value.ToString() ))
{
return true;
}
else return false;
}
However, I've realized, that my function needs to accept
accented characters as well.
I mean, characters like áéíóúâä, etc.
How do I write my regex to allow them ?
Regards,
characters from a to z and the "_" character :
public static bool IsAlpha( char Value )
{
Regex regExp = new Regex("^[a-zA-Z_]*$");
if (regExp.IsMatch( Value.ToString() ))
{
return true;
}
else return false;
}
However, I've realized, that my function needs to accept
accented characters as well.
I mean, characters like áéíóúâä, etc.
How do I write my regex to allow them ?
Regards,