I have SQL code like:
--START
select * from table;
--END
I need to get everything between --START
and --END
. What I came up with is
/--START(?s)(.*)--END/
or
`/--START(\r\n|\r|\n)(?s)(.*)--END/`
the first one works fine but adds one empty line before the select. So in the end I get
empty line
select * from table;
What I need to do is to get rid of this one empty line in the beginning. Would anybody help me how to get there: find everything between --START + newline
and '--END'?
I tried Match linebreaks - \n or \r\n? but answers there didn't work for me.