Please assist with the following:
I use the following regex pattern to catch all values inside MySQL queries (["'])(?:(?=(\\?))\2.)*?\1
This works perfectly fine when run on regex online tester https://regex101.com/r/tysxYk/1
But when i use it inside php it returns nothing and can't figure out what's wrong
<?php
$query = <<<EOT
UPDATE `wp_options` SET `option_value` = 'a:1151:{s:15:\"activ";}' WHERE `option_name` = 'my_options';
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');
EOT;
$status = preg_match( '#(["\'])(?:(?=(\\?))\2.)*?\1#', $query, $matches );
print_r($matches);
Thanks for your support !