With a regex I want comment out constraint by matching 'CONSTRAINT ... ( ))' and replacing it with '\*CONSTRAINT ... ( ))*\'. Operator . * in notepad++ matches the whole document so I cannot use it.
I was thinking of something like the following however some modifications are needed:
CONSTRAINT[\w\s]*\)\)
Input:
modified_date datetime NULL,
etl_id int NULL,
etl_date smalldatetime NULL,
CONSTRAINT PK_WORK PRIMARY KEY CLUSTERED
(
work_id ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
)
Thanks