-1
我有一个文本,我需要找出一个双引号的文本。敌人例如使用php从大型内容中提取文本
this is the "dummy text for the" content
我需要得到的值作为dummy text for the
任何一个人知道如何得到这个使用PHP?
或任何PHP的功能?
感谢
我有一个文本,我需要找出一个双引号的文本。敌人例如使用php从大型内容中提取文本
this is the "dummy text for the" content
我需要得到的值作为dummy text for the
任何一个人知道如何得到这个使用PHP?
或任何PHP的功能?
感谢
<?php
$subject = 'this is the "dummy text for the" content';
$pattern = '/"(.*?)"/';
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
echo $matches[0][1];
?>
使用'的preg_match()'检查文档的详细信息http://php.net/preg_match – 2013-02-06 12:08:12