How to extract multiple hostname from a long string by using regexp_substr
Hi Oracle Community,
I am trying to extract multiple hostname out from long strings. However, my query is only able to extract the first hostname. I did try to put {1,0} after the match pattern '((HOST|HOSTNAME)[[:space:]]*(\=)[[:space:]]*(\w+|\-|\_)*(\.\w+)*|(\w+|\-|\_)*(\.\w+)+|((\w+|\-|\_)+$)){1,}', but still not able to extract the rest of occurrence match at all. Can someone please help me out? Thanks.
== The query output ===
HOSTNAME
--------------------
LXC01-VIP.TEST.COM
Expected Output
LXC01-VIP.TEST.COM LXC02-VIP.TEST.COM
-------------------------------- My current query ----------------------------------
SELECT
REGEXP_REPLACE (
REGEXP_REPLACE (
REGEXP_REPLACE (
REGEXP_SUBSTR (