SQL-Server-Regex gives you the power to run regular expressions inside SQL Server queries. It works by using SQL CLR functions to call the C# System.Text.RegularExpressions library.
The RegexMatch() scalar function lets you call a regular expression against a string, and returns the first result if there is a match.
The RegexMatches() table-valued function lets you call a regular expression against a string, and returns all matches.
The RegexGroupMatch() scalar function lets you call a regular expression with named groups against a string, and returns the group name you specify.
The RegexReplace() scalar function lets you call a regular expression to find-and-replace inside a string. You can also match parts of a string and re-arrange them using references.
The RegexSplit() table-valued function lets you call a regular expression against a string to split it into pieces, and returns the pieces.
You can install sql-server-regex on most versions of SQL Server. This works the same for virtual machines or cloud VMs.
You can also install sql-server-regex onto AWS RDS.
Note: for SQL Server 2005, 2008, and 2008R2, if you can't install the DLL directly, you may you need to compile the assembly yourself using .NET 2.0 and an old version of Visual Studio.
This work has been tested, both for functionality and performance.