(?m)^(UPDATE|SELECT|INSERT INTO).*;$ should work. This would extend the pattern to match over newlines. It should be able to loop through and find all your SQL.
Looking at the example you provided it will match your commands until the ;. You can see the example used for testing here.