パターンと交換に問題があります。交換用エコーを次のような最終製品にするにはどうすればよいですか?
INSERT INTO `table` (`person`, `file`) VALUES
('test','test'),
('test2','test2'),
('test3','test3');
文字列をSQLに挿入しようとしていますが、そのためには以下の現在の文字列をフォーマットする必要があります。また、文字列test3:test3の最後の部分、またはSQLパターンを閉じるためのテキスト('test3 '、' test3');
<?php
$string = 'test:test test2:test2 test3:test3';
$pattern = '';
$replacement = '';
echo preg_replace($pattern, $replacement, $string);
?>
また、このような文字列も含めることができますか?'test@test.com:test test2:test2'
一方、電子メールは常にコロンの前にあります。