using System; using System.Text.RegularExpressions; public class Test { public static void Main() { var s = "hello 'world' hehe"; var m = Regex.Match(s, "'([^']*)'"); string res = null; if (m.Success) { res = m.Groups[1].ToString(); } Console.WriteLine(res); } }