PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Feb 27, 2017 1:46 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: preg_match_all and tabs
PostPosted: Thu Oct 01, 2015 5:14 pm 
Offline
Forum Newbie

Joined: Thu Oct 01, 2015 5:01 pm
Posts: 1
Hi,

I want to use preg_match_all for working with a websites' source code.
Actually my code looks like this:

Syntax: [ Download ] [ Hide ]
preg_match_all("!<span class=\"strong\">CR: </span>(.*?)</p>!",$p2,$con);
        $erh = $con[1][0];


Anyway, the source code looks like that:

Syntax: [ Download ] [ Hide ]
<span class="strong">CR: </span>
                                NC
                        </p>


Between </span> and NC are one linefeed and four tabs, between NC and </p>there are one linefeed and three tabs.

How can I manage it to receive only NC as a result for $con[1][0]?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group