I have the following string in Oracle as one continuous line, where instead of displaying this information as one continuous string, I actually would like to append a carriage return/new line before ever occurrence of “:F” and “:L”, which would also require the removal of the “:” before F and L
So current string:
F:AA BB:F:BB CC dd:F:ZZ Xx Y:L:Hello:F:Goodbye
Newly displayed string:
F:AA BB
F:BB CC dd
F:ZZ Xx Y
L:Hello
F:Goodbye
Trying to achieve this as a concise function in Oracle pl/sql, so that I can pass in the current string and get back the new string with carriage return/new line breaks.
I don’t think you need regex. The simple replace should do the trick.
That gives unix style new lines. If you want windows newlines then you need to use
CHR(13)||CHR(10)instead of justCHR(10).And you can use this just the same in a query too.