Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
"
select\s+(\*|((\w+(\.\w+)?)+(\s?,\s?\w+(\.\w+)?)*)|((\w+\([^\s]|(\w+\.\w+)?\))(\s+\,\s+)?)+)\s+from\s+(\w+(\s?,\s?\w+)*\;?)(\s+((\w+\s+join)\s+(\w+(\.\w)?\s+on\s+(\w+(\.\w+)?\s+=\s+\w+(\.\w+)?)?)(\s+,\s+)?)+)?(\s+((limit\s+(\w+)?\s?(\,\w+\;)?)|((where)?\s+?([^\;]+\s?;))))?
"
mg
Input 1
select * from table4; select * from table4,table5; select table4.id from table4,table5; select table4.id from table4,table5 where table4.id=table5.id; select * from table4,table5 where table4.id=table5.id; select * from table4,table5 where table4.id=table5.id and table4.id => 1 ; select table4.id,table5.name from table4,table5 where table4.id=table5.id and table4.id>1 ; select table4.id from table4,table5 where table4.id=table5.id like %ll%; select table4.id from table4,table5 where table4.id=table5.id limit 1,10; select table4.id from table4,table5 limit 1,10; select table4.id from table4,table5 limit 1 ; select table4.id from table4,table5 where id <> 1 limit 1 ; select count(*) from table4,table5 where id <> 1 limit 1 ; select count(*) from table4,table5 where id <> 1 having dd group by dd ; select count(*) , max(table4.id) from table4,table5 where id <> 1 having dd group by dd ; select * from tab1 left join tab2 on tab1.size = tab2.size where tab2.name = AAA; select * from tab1 lef
Extraction
select * from table4; select * from table4,table5; select table4.id from table4,table5; select table4.id from table4,table5 where table4.id=table5.id; select * from table4,table5 where table4.id=table5.id; select * from table4,table5 where table4.id=table5.id and table4.id => 1 ; select table4.id,table5.name from table4,table5 where table4.id=table5.id and table4.id>1 ; select table4.id from table4,table5 where table4.id=table5.id like %ll%; select table4.id from table4,table5 where table4.id=table5.id limit 1,10; select table4.id from table4,table5 limit 1,10; select table4.id from table4,table5 limit 1 ; select table4.id from table4,table5 where id <> 1 limit 1 ; select count(*) from table4,table5 where id <> 1 limit 1 ; select count(*) from table4,table5 where id <> 1 having dd group by dd ; select count(*) , max(table4.id) from table4,table5 where id <> 1 having dd group by dd ; select * from tab1 left join tab2 on tab1.size = tab2.size where tab2.name = AAA; select * from tab1 lef