は、私は、次の形式のPHPの文字列を持っている:PHP、preg_replaceを使用して二重引用符で囲んだ文字列を削除しますか?
$str = 'This is a "sample string"';
は、私は、二重引用符で囲まれた文字列を削除したいです。このように:
This is a
は、私が試したもの:
$fileread = preg_replace('!/\*.*?\*/!s',' -', $fileread);
$fileread = preg_replace('![ \t]*//.*[ \t]*[\r\n]!', '', $fileread);
$separator = preg_replace('/"[^"]+"/','',$fileread);
$separator = explode(" ",$separator);
それを抽出するための簡単な方法はありますか?
これは私が探しているものです。ありがとう兄貴!感謝! –