Good day.

As in Oracle, extract a word from a string or words with a specific prefix. Suppose you have the string "element 1, element 2, element 1 - acc.block, element 2 - acc.batch" - from this line you need all the words with the prefix "acc."

on input: "element 1, element 2, element 1 - acc.block, element 2 - acc.batch", on output: "acc.block", "acc.batch"

    1 answer 1

    with Q as( select 'element 1, element 2, element 1 - acc.block, element 2 - acc.batch' as str from DUAL ) select regexp_substr(str, 'acc\.\w+', 1, level) from Q connect by regexp_substr(str, 'acc\.\w+', 1, level) is not null;