Answer the question
In order to leave comments, you need to log in
How to use a regular expression to find the next character after the pattern?
There is a SQL script in text format. It is necessary that kind equal to 1 be put down everywhere, i.e. in fact find the numbers following the pattern - (VALUES.*?,.*?,.*?,). In this case, it is 0. Can this be done somehow through regular expressions?
INSERT INTO table(name, dsc, type, kind, n, s, d, def_n, def_s, def_d, change_dt, r_id)
VALUES (N'TEST1',null,4,0,1,null,null,1,null ,null,getdate(),0);
INSERT INTO table(name, dsc, type, kind, n, s, d, def_n, def_s, def_d, change_dt, r_id)
VALUES (N'TEST2',null,1,0,5000,null,null,5000,null ,null,getdate(),0);
INSERT INTO table(name, dsc, type, kind, n, s, d, def_n, def_s, def_d, change_dt, r_id)
VALUES (N'TEST3',null,3,0,null,'ALL',null,null ,'ALL',null,getdate(),0);
Answer the question
In order to leave comments, you need to log in
I needed to replace in notepad ++, then when adding an asterisk character to the template, the regular expression became invalid. As a result, I made a replacement according to the following pattern - (?<=(\D',null,\d,))\d .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question