4
I need to check if a string starts with numbers. I want to do this using Regex in c#
public static class StringExtensao
{
public static bool ComecaComNumero(this string str)
{
if (string.IsNullOrEmpty(str))
return false;
return char.IsNumber(Convert.ToChar( str.Substring(0,1)));
}
}