Page 1 of 1

How to get this without preg_replace?

Posted: Thu Feb 18, 2010 5:32 am
by klevis miho
Ok I have this regex: '#<p>(.+?)</p>#s' which gets the contents inside <p> and </p>.
How can I get the contents but without the (3 matches) and (2) ?
I solved this by adding a preg_replace, but I want just to use preg_match once.

<p>
Computers: Internet: On the Web: Online Communities: Social Networking: Facebook (3 matches)
Games: Video Games: Browser Based: Cheats and Hints (2)
</p>

Re: How to get this without preg_replace?

Posted: Thu Mar 04, 2010 8:05 am
by garygay
sorry ,you want to get thie without preg_replace ……