Regular Expression interesting problem

A

Arun Kumar

Hi,
At present I'm learning about regular expressions in order to do an html
scraping assignment. Everything worked fine until I met with a problem.
Given below are two different html tags

<link rel="alternate" type="application/rss+xml" title="RSS 2.0"
href="http://www.shoe-g.com/index.xml" />

<link
href="http://newsrss.bbc.co.uk/rss/newsonline_world_edition/help/rss/rss.xml"
rel="alternate" type="application/rss+xml" title="BBC NEWS | Help | RSS"
/>

Now what i want is to capture the url inside 'href' if
type="application/rss+xml". It really seems to be simple but it is the
position of the 'type' that creates the problem. In the first tag the
type is before href and in the second the type is after href. It seems
to me as an interesting problem but i need help to solve that. Please
help me.

Regards
Arun Kumar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top