using System; using System.Text.RegularExpressions; public class Test { public static void Main() { String s = @"abcde my first line fghij my second line klmno my third line"; String mySubstring = "fghij"; Match m = Regex.Match(s, "^" + mySubstring + ".*", RegexOptions.Multiline); if (m.Success) { Console.WriteLine(m.Value); } } }