Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
r"
(?:SELECT\s++(?=(?:[#\w,`.]++\s++)+)|(?!^)\G\s*+,\s*+(?:`?+\s*+[#\w]++\s*+`?+\s*+\.\s*+)?+`?+\s*+)(\w++)`?+(?:\s++as\s++[^,\s]++)?+
"
ig
Input 1
1
New
SELECT columnA, columnB as foo, table.column8, table.column3 as foo, `column7`, `column4` as foo, `table`.`columnZ`, `#__table`.`columnF` as foo FROM datable where Select column1, column2 From table select column0 from table
Extraction