using System; using System.Text.RegularExpressions; public class Test { public static void Main() { var s = @"this is my text here is a link http://d...content-available-to-author-only...f.com and my is /images/dd.gif"; var regex = new Regex(@"\S*/images\S*|(? match.Groups[1].Success ? "" : match.Value); Console.WriteLine(result); } }