0

I have lot of queries like this:

create table results
(
  id bigint,
  order_id bigint,
  article_id bigint default 0 ,
  check_id bigint,
  status text(1),
  total_units bigint,
  units_checked bigint,
  endtime bigint default 0,
  tenantid text(5),

  PRIMARY KEY (id,check_id,order_id, article_id, (tenantid,order_id,article_id,check_id))
--  constraint results_id_pk primary key (id),
--  constraint results_check_id_fk foreign key (check_id) references checks (id),
--  constraint results_order_id_fk foreign key (order_id) references orders (id),
--  constraint results_article_id_fk foreign key (article_id) references articles (id),
--  unique(tenantid,order_id,article_id,check_id)
  );

I like to delete all lines starts with '--'.

I tried as suggested in Delete all lines starting with # or ; in Notepad++

^[-].*
^(-).*\r\n
^(\s)*(-).*(\r\n|\r|\n)?

Unfortunately not working for me.

halfer
  • 19,471
  • 17
  • 87
  • 173
Sun
  • 3,156
  • 6
  • 47
  • 75

2 Answers2

0

^[#;].* : Says remove lines starting with # or ;

You need to remove lines starting with -- so please try ^--.*

nbirla
  • 590
  • 3
  • 13
0

Try with \n followed by -- and match any character after it

\n--.*
StefansArya
  • 2,494
  • 3
  • 21
  • 23