Page 1 of 1

How to match this

Posted: Fri May 18, 2007 9:47 pm
by GeXus
Ok, I just don't get regex... im lost.. this is what I want to match
<h2 class=a><a href="http://urlhere" class=b><b>Site Name</b> - Site Title</a></h2>
I'm trying to extract two thigns from this.. 1. the URL and 2. the site name - title (the <b> should be ingore or returned with that match..

This is what I have for the URL

Code: Select all

/<h2 class=a><a href="(.*?)" class=b>/
Needless to say, It doesnt work, it still returns matches even for URLs that do not have the ending class=b,.. Any help would be GREAT!

Posted: Sat May 19, 2007 3:56 am
by Ollie Saunders
I don't see how it would do that. Post the input and the output please.

Posted: Sat May 19, 2007 9:25 am
by GeXus
I actually think I had something else that was causing the issue.... sorry, thanks anyways though