From: Sean O'Halpin Date: 2009-03-28T20:32:53+09:00 Subject: Re: Regular Expression interesting problem On Sat, Mar 28, 2009 at 9:07 AM, Arun Kumar wrote: > Hi, > I'm learning about regular expressions right now for a html scraping > based assignment. But now I've reached a problem. Given below are two > different html tags. > > 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" > /> > > href="http://gdata.youtube.com/feeds/base/standardfeeds/top_favorites?client=ytapi-youtube-index&time=today&v=2"> > > Now what i want is to capture the href-url if the type = > "application/rss+xml". It seems to be simple but it is the position of > the 'type' that creates the problem. In first tag the 'type' is after > href and in the second the 'type' is before it. It seems to me as an > interesting problem, but i need help for solving it. Please help me. > > Regards > Arun Kumar In your last post you were telling us about a strict 'boss' who wouldn't let you use REXML or any XML parsing libraries. I take it this 'boss' is your teacher. This isn't an interesting problem. Do your own homework and don't lie to try to get others to do it for you.