I want to comment piece of pretty similar text in document in Sublime using replace with regex.
Input:
@b =
SELECT *
FROM @e;
UNION ALL
SELECT *
FROM @c_historical;
@r =
SELECT *
FROM @f;
UNION ALL
SELECT *
FROM @y_historical;
Expected output:
@b =
SELECT *
FROM @e;
/*UNION ALL
SELECT *
FROM @c_historical;*/
@r =
SELECT *
FROM @f;
/*UNION ALL
SELECT *
FROM @y_historical;*/
I tried to use this regex (UNION ALL\D*historical;)
and replace with /*\1*/
(using Sublime)
but getting another result
@b =
SELECT *
FROM @e;
/*UNION ALL
SELECT *
FROM @c_historical;
@r =
SELECT *
FROM @f;
UNION ALL
SELECT *
FROM @y_historical;*/
How I could kind of separate this 1 match to 2 different?