I am trying to convert a string into multiple rows using REGEX, can someone tell me if this is accomplishable using oracle regular expressions
WITH qry AS (
SELECT '<p>one</p><p>two</p><p>three</p>' as str
FROM DUAL
)
SELECT
--regexp_replace(
--regexp_replace(
regexp_substr (str,
'[^<(/?)p>].*', 1, LEVEL)
--,'<p>','')
--,'</p>','')
ab
FROM qry
CONNECT BY LEVEL <= LENGTH(regexp_replace (str, '[^<(/?)p>].*'))+1
;
Current Output:
1 one</p><p>two</p><p>three</p>
2 (null)
3 (null)
4 (null)
Expected Output:
1 one
2 two
3 three