how to find result of matched query in php <p>i am having one probelm cant cant figure it out how i can proceed. I have string like </p> <pre><code> "Coolman United States Member Since January 2013 Loans 114.01 Active 66.00 Repaid Credentials 2 followers eBay windchester 42 Friends 2" </code></pre> <p>now with php i need to find the user name that is "Coolman" country, member sience, loans, active, repaid, followers.</p> <p>I know with preg_replace, regex i can find the exact text that is matched. but the problem is there are hundreds of data like this similar pattern, with different username with different countries, different dates etc so how can i have result like this?</p> <p>username : Coolman country:United State Member Since: January 2013 and so on...</p> <p>Thanks for your help</p>