SQLTeam.com | Weblogs | Forums

How to convert this SQL Server

Hello,
What does SQL Server use for instr and regexp_substr. How would i convert the following piece of code in SQL Server.

INSTR(REGEXP_SUBSTR (URI, '/([[:alnum:]]+(/|?){3}){1,2}'),'/',1,3) > 0

Thanks.

Hope this helps :+1::+1::slightly_smiling_face:

http://www.sqlsnippets.com/en/topic-11747.html

++++++++++++++++++++

SQL Server does not have built-in regular expression matching or replacement. You could add such support via SQLCLR.

There are code examples online, but make sure to review the code carefully before adding it to your database.