^start of line
VIEWthe literal text VIEW (case insensitive) \s+a Unicode whitespace character, repeated at least once
\w+a Unicode word character, repeated at least once
Group 3(.*(?:\n(?!SELECT|VIEW|FROM).*)*) .*any Unicode character (except for line terminators), repeated any number of times
Non-Capturing Group(?:\n(?!SELECT|VIEW|FROM).*)* *repeats the group contents below any number of times:
\na line-feed (newline) character (ASCII 10)
Negative Lookahead(?!SELECT|VIEW|FROM) SELECTthe literal text SELECT (case insensitive) VIEWthe literal text VIEW (case insensitive) FROMthe literal text FROM (case insensitive) .*any Unicode character (except for line terminators), repeated any number of times
\na line-feed (newline) character (ASCII 10)
SELECTthe literal text SELECT (case insensitive) \s+a Unicode whitespace character, repeated at least once
Group 4(.*(?:\n(?!SELECT|VIEW|FROM).*)*) .*any Unicode character (except for line terminators), repeated any number of times
Non-Capturing Group(?:\n(?!SELECT|VIEW|FROM).*)* *repeats the group contents below any number of times:
\na line-feed (newline) character (ASCII 10)
Negative Lookahead(?!SELECT|VIEW|FROM) SELECTthe literal text SELECT (case insensitive) VIEWthe literal text VIEW (case insensitive) FROMthe literal text FROM (case insensitive) .*any Unicode character (except for line terminators), repeated any number of times
\na line-feed (newline) character (ASCII 10)
FROMthe literal text FROM (case insensitive) \s+a Unicode whitespace character, repeated at least once
\w+a Unicode word character, repeated at least once
Non-Capturing Group(?:\s+\w+) \s+a Unicode whitespace character, repeated at least once
\w+a Unicode word character, repeated at least once
;the literal ; (5910 / 738 / 3B16)
g modifier: global. Finds all matches instead of stopping after the first
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string
i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters