<pre><?php
$file = " # Dump File
# Database is ported from MS Access
CREATE DATABASE IF NOT EXISTS `movedb`;
# Table structure for table 'test_prefixSwitchboard Items'
DROP TABLE IF EXISTS `test_prefixSwitchboard Items`;
CREATE TABLE `tbl` (
`x` INTEGER NOT NULL,
`y` INTEGER NOT NULL DEFAULT 0,
`z` VARCHAR(255)
) ENGINE=innodb DEFAULT CHARSET=utf8;
SET autocommit=1;
#
# Dumping data for table 'Switchboard Items'
#
INSERT INTO `tbl` ( `x`, `y`, `z`) VALUES ( '111' , '111' ,'111');
INSERT INTO `tbl` ( `x`, `y`, `z`) VALUES ( '222' , '2222' ,'222');
INSERT INTO `tbl` ( `x`, `y`, `z`) VALUES ( '333' , '333' ,'333');
";
preg_match_all( '/VALUES\s+\(\s+(.*?)(?=\);\s*$)/m', $file, $matches);
foreach( $matches[1] as $match)
echo $match . "\n";;
preferences:
45.03 ms | 402 KiB | 5 Q