# Regular Expression interesting problem

**URL:** <https://www.ruby-forum.com/t/regular-expression-interesting-problem/164133>\
**Category:** Ruby\
**Created:** [March 28, 2009, 10:47am UTC](https://www.ruby-forum.com/t/regular-expression-interesting-problem/164133 "2009-03-28T10:47:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunvoip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e8c25b/32.png) [@arunvoip](https://www.ruby-forum.com/u/arunvoip)\
**Post date:** [March 28, 2009, 10:47am UTC](https://www.ruby-forum.com/t/regular-expression-interesting-problem/164133/1 "2009-03-28T10:47:25Z")

</div>

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

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 K.
