using System.Text.RegularExpressions;
class Program
{
static void Main()
{
//var strArr = new string[] {"abcde","fghij",
// "klmno","pqrst",
// "uvwxy","z"};
string[] strArr = {"abcde","fghij",
"klmno","pqrst",
"uvwxy","z"};
const string Pattern = "^[a-z-[aiueo]]+";
System.Console.WriteLine("Pattern {0}", Pattern);
foreach (string each in strArr) {
string WillOut = each;
if (Regex.IsMatch(each, Pattern)) {
WillOut += " matchs ";
WillOut += Regex.Match(each, Pattern).Value;
}
else {
WillOut += " no match";
}
System.Console.WriteLine(WillOut);
}
}
}