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
/
;\s*\K[^;|]*?(?= *\|)
/
g
Input 1
New
SELECT col1,col2,col3 FROM users WHERE id IN (1,2,3,4); SELECT * FROM references WHERE status = 1 ; SELECT a.col1 , a.col2 , b.col1 FROM table_a a | <--- Here is the caret, run this query INNER JOIN table_b b ON b.id_table_a = a.id WHERE a.id = 5 ; UPDATE table_a SET col1 = 'demo' WHERE id = 3; -- etc, etc, etc
Extraction
SELECT col1,col2,col3 FROM users WHERE id IN (1,2,3,4); SELECT * FROM references WHERE status = 1 ; SELECT a.col1 , a.col2 , b.col1 FROM table_a a | <--- Here is the caret, run this query INNER JOIN table_b b ON b.id_table_a = a.id WHERE a.id = 5 ; UPDATE table_a SET col1 = 'demo' WHERE id = 3; -- etc, etc, etc