View Single Post
Old 03-08-2012, 06:19 PM  
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by fris View Post
im looking to match a h1 tag with a class, but also match after that class so

<h1 class="video-title one two clearfloat">get this</h1>

/<h1 class="video-title .*?\">(.*?)<\/h1>/

is this correct?
You probably should be using a parser because your regexes and such are going to get out of hand as the project grows. That said, the .* will include > so you need a class there and the ? is meaningless given the * . So you're looking at something like:


/<h1 class="video-title([^>]*)\">([^<]*)<\/h1>/
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote