String splitting in T-SQL has historically been inefficient and limited. While STRING_SPLIT improved things, its constraints remained – until now, that is. SQL Server 2025 introduced the REGEXP_SPLIT_TO_TABLE function, offering a more flexible solution for complex scenarios. In this article, Greg Low explains how it works.
I’ve worked with T-SQL for many decades and, for the longest time, there were two features that everybody seemed to want. The first was a TRIM function, so we didn’t have to keep writing LTRIM and RTRIM together. Nobody seemed to understand why that didn’t exist. The second feature people wanted? A way to split strings efficiently.
The issue with splitting strings in

