0

I want to be able to search a pattern like 'CREATE TABLE ' followed by any expression include newline and ending with );

So it should be able to select following 2 create table stamtement one after other.

create table tab1 ( col1 number,

col2 date);

create table tab3 ( col1 number,

col2 date,

col3 number);

I did tried create table .* but I am not able to include newline .

Thanks.

snowrock
  • 161
  • 1
  • 1
  • 8

1 Answers1

1

this should do:

create table [^;]*;

check the matches newline checkbox

Kent
  • 189,393
  • 32
  • 233
  • 301
  • Thanks. It worked in Notepad++ :-). Could you please briefly tell me what does [^;]*; mean. Also, any way to make it work in textpad. – snowrock Jan 16 '14 at 22:15
  • @user3204310 `[^;]*` is regex, means any number of not `;` chars. google regex for details. I don't have textpad, don't know if it supports regex. in fact I don't have notepad++ either. but I knew that it supports regex and has that checkbox. ;) – Kent Jan 16 '14 at 22:21
  • It's not mandatory to check `dot matches newlines` because you don't have dot in your regex. But you have to check `Regular expression`. – Toto Jan 17 '14 at 08:25