I'm looking into finding a Pattern in order to get the table name for this type of SQL query;
INSERT INTO table(uuid,type) VALUES (?,?)
This will never be a very fool proof way of extracting table names from SQL. But here is a solution to the problem using regex like you need. You've specified the WHERE part in the provided expression but is it really necessary if you just need the name?
Note that there are many ways a SQL statement can be formatted and it's very unlikely that anyone can come up with an expression that can parse SQL in the way you need.