Regex escape mathes before using them as regex to prevent delimiter problems.