using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; public class Test { public static void Main() { var text = "[MYLINK ID=\"1234\" URL=\"http://m...content-available-to-author-only...e.com\" TEXT=\"Website link\"]"; var pattern = "\\[MYLINK\\s+ID=\"([^\"]*)\"\\s+URL=\"([^\"]*)\"\\s+TEXT=\"([^\"]*)\"]"; var replacement = "$3"; var result = Regex.Replace(text, pattern, replacement, RegexOptions.IgnoreCase); Console.WriteLine(result); } }