Suppose that I have this table MESSAGE with two columns ITEM and CONTENT
ITEM1 | Dear ${username}, you have changed your address to ${address}
ITEM2 | Hi ${username}, thank you for attending this event.
Currently, I want to display each word with this pattern ${variable}. The expected end result is
ITEM1 | ${username}, ${address}
ITEM2 | ${username}
Whats the correct Oracle SQL query to achieve this ? I have tried something like this but it just list out the content with matching regex.
SELECT ITEM, REGEXP_SUBSTR(CONTENT, '^.*\$\{.*\}.*$', 1, 1) FROM MESSAGE;