so we have a string of data which may contain something like this:
(<acronym class=\"cticker\">UST</acronym>)
We want to modify it slightly so it is this:
(<acronym class=\"cticker\">UST-USD</acronym>)
I started to play with some REGEXP_REPLACE like this:
SELECT REGEXP_REPLACE(json_content, '\(<acronym class=[\\]+\"cticker[\\]+\">([a-zA-Z0-9]{1,5})</acronym>\)',
But now I got stuck, not sure how to make the right side of this expression. Here, the ticker value, UST can be anything. So, just need to append "- USD" to it, like I'm trying to do above.
Was hoping someone is better at regular expressions that me.
\1in the replacement string to copy the capture group. So it becomes\1-USDto add-USDto it.