Notepad++ Tips

Sometimes you need to remove ids from sql dump. For example:

INSERT INTO public.dcicv VALUES (4, 'Benzilpenicilina Benzatínica', 'Antibacterianos', 'Penicilinas');
INSERT INTO public.dcicv VALUES (5, 'Procaína', 'Antibacterianos', 'Penicilinas');
INSERT INTO public.dcicv VALUES (6, 'Benzilpenicilina procaínica', 'Anti-infeciosos',  'Penicilinas');

convert to :

INSERT INTO public.dcicv VALUES ( 'Benzilpenicilina Benzatínica', 'Antibacterianos', 'Penicilinas');
INSERT INTO public.dcicv VALUES ( 'Procaína', 'Antibacterianos', 'Penicilinas');
INSERT INTO public.dcicv VALUES ( 'Benzilpenicilina procaínica', 'Antibacterianos', 'Penicilinas');

just do replace regular expression: [0-9]+(\,)

Comments

Popular posts from this blog

Certbot

Mapserver install on Ubuntu 18.04 with Naviserver: