SELECTthe literal text SELECT (case sensitive) \s*any whitespace character, repeated any number of times
[^]+?any character, including newline, repeated at least once
\s*any whitespace character, repeated any number of times
FROMthe literal text FROM (case sensitive) \s*any whitespace character, repeated any number of times
.+?any character (except for line terminators), repeated at least once
\s*any whitespace character, repeated any number of times
Non-Capturing Group(?:WHERE\s*([^]+?(?=\s*LIMIT)|[^]+?)\s*)? ?repeats the group contents below at most once:
WHEREthe literal text WHERE (case sensitive) \s*any whitespace character, repeated any number of times
Group 3([^]+?(?=\s*LIMIT)|[^]+?) 1st Alternative[^]+?(?=\s*LIMIT) [^]+?any character, including newline, repeated at least once
Positive Lookahead(?=\s*LIMIT) \s*any whitespace character, repeated any number of times
LIMITthe literal text LIMIT (case sensitive) [^]+?any character, including newline, repeated at least once
\s*any whitespace character, repeated any number of times
Non-Capturing Group(?:LIMIT\s*([,\d\s]+?)\s*)? ?repeats the group contents below at most once:
LIMITthe literal text LIMIT (case sensitive) \s*any whitespace character, repeated any number of times
+?matches at least one character from the set below:
,the literal , (4410 / 548 / 2C16)
\da digit
\sany whitespace character
\s*any whitespace character, repeated any number of times
$end of string