SQL Server 2025 and Azure SQL Database now include native regex support through built-in T-SQL functions. These functions — including regexp_like, regexp_count, regexp_replace, regexp_substr, regexp_split_to_table, and regexp_matches — use standard regex syntax compatible with other languages like Java and C#. They replace complex, hard-to-read string manipulation code using CHARINDEX, SUBSTRING, and PATINDEX. Key highlights include splitting strings on multi-character delimiters (a limitation of the existing STRING_SPLIT), counting pattern occurrences, extracting substrings, and returning rich match metadata including positions and JSON output. The feature is available across Azure SQL Database, SQL Server 2025, Azure SQL Managed Instance, and Fabric SQL Database.
Sort: