View Single Post
Old 03-08-2012, 08:11 PM  
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
Like post #2 I prefer to use DOM for this type thing but something else I tend to do is use negatives in my regex so like this where $html contains the html/string:

Code:
if ( preg_match( '/<h1 class="video-title[^"]+">([^<]+)/', $html, $m ) )
{
        // var_dump($m);
        $h1 = $m[1];
}
edit: Ah I see ray had a similar thought.
__________________

Last edited by Brujah; 03-08-2012 at 08:12 PM..
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote