I am trying to write a regex expression for identifying alphabets in a string. I need to go character by character for using it in my program in C#
String originalData = "90123Abc";
Regex _regex = new Regex(@"[a-zA-Z]$");
foreach (char c in originalData)
{
if (System.Text.RegularExpressions.Regex.IsMatch(c, _regex))
{
System.Console.WriteLine(" (match for '{0}' found)", _regex);
}
else
{
System.Console.WriteLine();
}
}
Is it possible to check character by character using regex? If not how could I go about it?
or shortly