Hi all,
I got the following text:
PRINT CONVERT(NVARCHAR, CURRENT_TIMESTAMP, 111) + ' ' + CONVERT(NVARCHAR, CURRENT_TIMESTAMP, 108) + ' -Test Mode : ' + (CASE WHEN @turbo_mode_ind = 1 THEN 'some text ''test'' some more text.' ELSE 'and even more text ''temp'' when will it stop ?' END)
PRINT 'text don''t text'
PRINT 'text ''test2'' text'
and what I want to match is:
PRINT CONVERT(NVARCHAR, CURRENT_TIMESTAMP, 111) + ' ' + CONVERT(NVARCHAR, CURRENT_TIMESTAMP, 108) + ' -Test Mode : ' + (CASE WHEN @turbo_mode_ind = 1 THEN 'some text ''test''
PRINT 'text ''test2''
So basically I want to match:
- starting at PRINT
- each char that comes after PRINT (.*)
- inclusive line-breaks (don't stop at line-breaks)
- with \'{2}\w+\'{2} at the end of the match
- non-greedy (.*?)
- AND no empty line(s) between PRINT and \'{2}\w+\'{2}
I've already compsed this, but it still matches empty line(s):
PRINT.?\'{2}\w+\'{2}(?!\n\s\n)
Thx for the help