I get some field in mssql which contain uuid like:
root://Item/Item//4296d6c9-3cc4-3d21-af4f-0cd4cdfbf31b/15/11
And I need to retrieve UUID from such string. It can change, and be like
root://Item/Item//4296d6c9-3cc4-3d21-af4f-0cd4cdfbf31b/15 or
root://Item/Item//4296d6c9-3cc4-3d21-af4f-0cd4cdfbf31b
I've tried to use same pattern as for pstgres, where it works, like:
SELECT PATINDEX('%([0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})%', 'root://Item/Item//4296d6c9-3cc4-3d21-af4f-0cd4cdfbf31b/15/11');
But receive 0; It seems like some other regexp rules exists for mssql. How I should write pattern for UUID?
Currently I found a solution, but it looks a little weird:
Why mssql doesn't support {number of repeats}, or do I have to use some other syntax?