Louis Davidson continues a series on regular expressions in SQL Server 2025:
Okay, we have gone through as much of the RegEx filtering as I think is a a part of the SQL Server 2025 implementation. Now it is time to focus on the functions that are not
REGEXP_LIKE
. We have already talked aboutREGEXP_MATCHES
, which will come in handy for the rest of the series.I will start with
REGEXP_REPLACE
, which is like the typical SQLREPLACE
function. But instead of replacing based on a static delimiter, it can be used to replace multiple (or a specific) value that matches the RegEx expression. All of my examples for this entry will simply use a variable with a value we are working on, so no need to create or load any objects.
Read on to see how it works, including plenty of examples.