add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
SELECT REGEXP_REPLACE('-first line
-line2

-line4

-line6', '([^' || chr(10) || '])' || chr(10) || '-', '\1' || chr(10) || chr(10) || '-') AS out
FROM dual
OUT
-first line

-line2

-line4

-line6