Regex Help
Posted: Sat Dec 11, 2010 8:59 pm
Hi, I need your help.
What is wrong here ?
Code: Select all
<?php
$content = file_get_contents('http://www.example.com' );
// Now I must to extract all the same divs: <div class=one>div_contents</div> with their contents and save //to an array
// The problem Is i'm bad with PCRE
preg_match_all('/^<div class=one>.*<\/div>$/' , $content, $divs);