I have this string here:
CREATE UNIQUE INDEX index555 ON
SOME_TABLE
(
SOME_PK ASC
);
I want to match across the multiple lines and match the SQL statements (all of them, there will be many in 1 large string)… something like this, however I am only getting a match on CREATE UNIQUE INDEX index555 ON
(CREATE\s.+;)
note: I am trying to accomplish this in java if it matters.
You need to use DOTALL and MULTILINE flags when compiling a regular expression. Here is a Java code example:
The output will be: