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
/
(?:INSERT INTO|UPDATE|SELECT|DELETE)(?:[^;'"]|(?:'[^']*?')|(?:"[^"]*?"))+;
/
ig
Input 1
1
New
String query = "select * from users_table where username = '" + u_username + "' and password = '" + u_password +"';"; String query2 = "select * from users_table where username = '" + u_username + "' and password = '" + u_password +"'"; SQLiteDatabase db //some un-important code here... Cursor c = db.rawQuery( p_query, null ); return c.getCount() != 0; }
Substitution
String query = "select * from users_table where username = '" + u_username + "' and password = '" + u_password +"';"; String query2 = "select * from users_table where username = '" + u_username + "' and password = '" + u_password +"'"; SQLiteDatabase db //some un-important code here... Cursor c = db.rawQuery( p_query, null ); return c.getCount() != 0; }