Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (10 sloc) 760 Bytes


SQL Regex Logo

RegexReplace() is a scalar function that lets you find-and-replace inside a string using regular expressions. RegexReplace() is a SQL CLR function that exposes the System.Text.RegularExpressions' Replace() method.

Let's look at a few examples, inspired by another handy Regular Expressions tutorial


Replace SSMS example

Change a sentence

select dbo.RegexReplace('Hello, my name is John Doe', 'my name is (.+)', 'my name is not $1')