In snowflake below is the regex for seperating strings based on >> but when data is with space it is not doing so I mean it is taking partial value not compete value
SELECT replace(REGEXP_SUBSTR( 'test1 >> test2 >> test3','([^>]*)([[:space:]]>>[[:space:]]|$)', 1,1 ) , ' >> ','') as test;
SELECT replace(REGEXP_SUBSTR( 'test1 >> test2 >> test3','\\w+([[:space:]]>>[[:space:]]|$)', 1,1) , ' >> ','') as test;
I have data like this 'test value >> test1 >> test2' But above regex is only giving as value but I want complete 'test value' can anyone help me on this?