Any Yahoo Pipes / Regular expressions gurus around?
Asked by
benseven (
3189)
September 23rd, 2008
Ok, want to try and keep this as simple as possible in terms of a question:
In Yahoo pipes I’m using the regex module on a feed in an attempt to extract a URL from the item.description field.
The culprit (source feed) is Facebook’s posted items feed for my own profile. The link it generates in the RSS feed takes you to Facebook, which of course is a walled garden and requires a login.
I’m attempting to pull the actual source item URL (e.g a Youtube video) from the description, in order to then pipe it into the rest of the feed replacing the Facebook link.
The main problem I’m having is not knowing much about regular expressions. I know for instance that if I were to use (.asterisk) it would do a replace on the whole contents of the description. In laymans code I want to <strip stuff here>Just keep the URL<strip stuff here> but don’t know how I’d go about that…
Thanks in advance.
Observing members:
0
Composing members:
0
4 Answers
Because it may help, here’s an example of the HTML that makes up the description section of the feed:
<div class=“ext_media clearfix has_extra has_thumb”>
<div class=“extra”>
<div class=“share_thumb”>
<a rel=“nofollow” target=“_blank” href=”http://www.youtube.com/watch?v=fqMu6e5Dgtg”>
<img id=“share_thumb_32211190685” src=“http://i3.ytimg.com/vi/fqMu6e5Dgtg/default.jpg” class=“img_loading”/></a>
</div>
</div>
<div class=“textual”><div class=“metadata”>
<div class=“title”>
<a rel=“nofollow” target=“_blank” href=“http://www.youtube.com/watch?v=fqMu6e5Dgtg” title=“http://www.youtube.com/watch?v=fqMu6e5Dgtg”>Talk like a Pirate</a>
</div>
<div class=“url”>Source: www.youtube.com </div>
<div class=“summary”>Learn to talk like a pirate. From loadingreadyrun.com</div>
</div>
</div>
</div>
Wow! I answered my own question by looking for an article on strip tags using regular expressions outside of Pipes.
I looked at the second comment here and got the correct result in pipes this way
Damn, I felt like I could have helped here, but you’re too quick.
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.