How to get this without preg_replace?

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
klevis miho
Forum Contributor
Posts: 413
Joined: Wed Oct 29, 2008 2:59 pm
Location: Albania
Contact:

How to get this without preg_replace?

Post 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>
User avatar
garygay
Forum Newbie
Posts: 5
Joined: Thu Mar 04, 2010 4:03 am

Re: How to get this without preg_replace?

Post by garygay »

sorry ,you want to get thie without preg_replace ……
Post Reply