using System; using System.IO; using System.Text.RegularExpressions; public class Test { public static void Main() { var s = "background-image: url('https://s...content-available-to-author-only...s.com/files.domain.com/uploads/image/file/168726/carousel_IMG_6455.jpg')"; var res = Regex.Match(s, @"'(.*?)'").Groups[1].Value ?? string.Empty; Console.WriteLine(res); } }