How to get word in php which contains colon(:)? <p>I have a word <code>Hello How are you :chinu i am :good</code> i want to get the word which contains <code>:</code> like <code>:chinu</code> and <code>:good</code></p> <p>My code:</p> <pre><code>&lt;?php //$string='Hello How are you :chinu i am :good'; //echo strtok($string, ':'); $string='Hello How are you :chinu i am :good'; preg_match('/:([:^]*)/', $string, $matches); print_r($matches); ?&gt; </code></pre> <p>Above code i am getting <code>Array ( [0] =&gt; : [1] =&gt; )</code> But not getting the exact text. Please help me.</p> <p>Thanks Chinu</p>