-1

我有一个文本,我需要找出一个用双引号括起来的文本。敌人的例子

this is the "dummy text for the" content 

我需要将值作为dummy text for the

有谁知道如何使用php获得这个?

或任何为此的php函数?

谢谢

4

1 回答 1

1
<?php
$subject = 'this is the "dummy text for the" content';
$pattern = '/"(.*?)"/';
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
echo $matches[0][1];
?>
于 2013-02-06T12:57:43.440 回答