Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Grabbing Data from HTML tags

  •  01-05-2008, 8:59 PM

    Grabbing Data from HTML tags

    I can't see anything that answers my question elsewhere on the forum, so I'll ask it here.

    I need to construct a regex that searches a url eg. www.mypage.com that contains the unique tags <span class "price">, </span>. Withing these tags is an integer price in the format of "20.99".

     How would you write this?

     Secondly, if I want to search a second url www.myotherpage.com for the same tags, but where the data is in the form of maybe "Our Price £20.99" or "&pound;20.99"

     How could I alter the regex to capture the string?

     PS. I'm looking for seperate regexes, not one big magic one that encompasses all of these possibilities. lol

     Many thanks

    Filed under:
View Complete Thread