2013-02-06 2 views
-1

텍스트가 있기 때문에 큰 따옴표로 묶인 텍스트를 찾아야합니다. 원수 예를PHP를 사용하여 큰 내용의 텍스트를 추출합니다.

this is the "dummy text for the" content 

내가 dummy text for the

같은 값을 얻을 필요가있는 사람은 PHP를 사용하여 얻는 방법을 알고 있나요?

또는 이에 대한 모든 PHP 기능은 무엇입니까?

감사

+2

사용'는 preg_match() 자세한 내용은'체크 문서 http://php.net/preg_match –

답변

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]; 
?> 
관련 문제