Match.Value
using System;
using System.Text.RegularExpressions;
class MatchingApp {
static void Main(string[] args) {
Regex r = new Regex("in");
Match m = r.Match("Matching");
if (m.Success) {
Console.WriteLine("Found '{0}' at position {1}",m.Value, m.Index);
}
}
}
Related examples in the same category