I need to replace all instances where a new line is not followed by a colon. This is because colon indicates the start of a new record (a record may span multiple lines).
REGEXP_REPLACE(raw,'(\n[^:])','this is a test')
For example, with the input:
:[MY DATA HERE]
[rest of record printed here]
produces the output:
:[MY DATA HERE]
this is a testrest of record printed here]
instead of:
:[MY DATA HERE]this is a test[rest of record printed here]
Note that the current output replaces the first non ':' character but not the new line. Does anyone know why this is not working as expected?
Thanks in advance