string input ="The dog ate a bone.";
string regex =@"^The (?<animal>\w+)\b ate (?<food>.+)\.$";
Match m = Regex.Match(input, regex);
Console.WriteLine(string.Format("Animal: {0}, Food: {1}!", m.Groups["animal"], m.Groups[2]));
learning/exam70-536/group.txt · Last modified: 2008/08/28 11:28 by david