 <p>Try this :</p> <pre><code>$string = "'Hello world' 'green apples' 'red grapes'"; preg_match_all("/'[\w\s]+'/",$string,$match); echo "&lt;pre&gt;"; print_r($match[0]); </code></pre> <p>Ref: <a href="http://www.php.net/manual/en/function.preg-match-all.php" rel="nofollow">http://www.php.net/manual/en/function.preg-match-all.php</a></p> <p>Output :</p> <pre><code>Array ( [0] =&gt; 'Hello world' [1] =&gt; 'green apples' [2] =&gt; 'red grapes' ) </code></pre>