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

Grids not displaying decimals, and behaving differently on different PCs?
Hello,

I coded a relatively simple MII application that allows data from a form to be add

Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database ass

Setting a default timezone?
I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY the

javascript in php code causes page to display white
Hi All,

Odd one this, I've got the following code (below) which is a simple log in form. The

Secure pages Sessions vs. Cookies & session_destroy() help
Im new here and new to PHP, I hope you can help me with some questions.

Im writing my web ap

Display a default image
I am trying to display generic image for items that don't have one, but I can't get it to display.

Problem Dereferencing
With these types and tables:

CREATE TYPE MANAGER AS OBJECT (
MGR_ID INTEGER,

Is it possible to view php source code??
Hi All

I was just wondering if it's possible to view a websites php source code?
I know

TCP Sending Unsigned Char...
Hi...

I want to send over tcp/ip some data, i have the data in hexadecimal, and when i tr

Oracle Connectivity
Hi Every One,

Can we access SAP from oracle database.If it possible then please spec

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