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];
?>
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

Implementing Single Sign-On using SAML 1.1, x.509, LDAP in C#.net
Hi, I got a requirement from the client i.e implementing single sing on using SAML 1.1( LDAP &

help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu

insert/update functions for mysql, what do you think?
I am working on two really simple functions that automatically generate (and execute) insert and upd

PHP and Javascript
Hello Everyone,

I have a page that needs a javascript code to be written between PHP code but

How could I combine these arrays??
Hello.. I'm trying to figure out a way to combine these first two arrays to get the last array..

gather checkbox data from form into email
Hello all,

First, i'd like to thank everyone who responded to my previous posts regarding set

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Having problemswith multithreading and prime numbers
I have an assignment when I'm suppose to do the following:

Write a multithreaded Java, Pt

DELETE rows based on content
I have a link in my rows

$bit="http://bit.ly/abcd";
$query = mysql_query("D

Can't shake the "Warning: include()" error
I've just uploaded my site to a new server and where I have PHP include tags in my HTML, the browser

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