preg_match logical error


Posted on 16th Feb 2014 07:03 pm by admin

Code: <?php
$s = file_get_contents("page.html");
preg_match('/<div class="brown_box main_ge_page vertically_spaced"><div class="subsectionHeader">(.*)</div>/', $s, $m);
echo $m[1];
Did you know?Explore Trending and Topic pages for more stories like this.
?>
page.html content
Code: <div class="brown_box main_ge_page vertically_spaced">
<div class="subsectionHeader">
Works
</div>
How come it doesnt get the word, "Works"
No comments posted yet

Your Answer:

Login to answer
129 Like 32 Dislike
Previous forums Next forums
Other forums

getting rid of quotes in strings
sick of trying to deal with them in multiple ways (entering in and taking from database, echoing, ec

How to make a input/output field with multiple lines
Hello.
I put a input/output field on the screen but I could not change height of it. I need to

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

Need help with a mail notify function
I was tasked with setting up a site that's been prewritten. The site is basically a form that captur

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

division gives infinity anser
int main()
{
int z=0;
int i=1/z;
cout<
}

It doesn't throw a

Help please - How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

IP Logger for Voting Script
Can anybody help me place an IP logger into my voting script?
I know that maybe it is not as secu

foreach iterator
Hi Guys
Does the foreach loop have an inbuilt iterator ?

displaying email without attracting a ton of spam
Hello,

this is maybe the wrong place to ask.
How would you display an email address on a w

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash