Regular Expressions and Yahoo Pipes

In summary, the individual is trying to create an RSS feed from an HTML table on a web forum's main page using Yahoo Pipes. They have made an attempt but are having trouble with the regular expression block and are seeking help from the community. They share their input for the regular expressions and mention that they were able to figure out most of their desired output with help from a forum post, but still need to format the date.
  • #1
John Creighto
495
2
I'm trying to create an rss feed from a html table on the main page of a web forum. I want to do this because the table displays the new posts.

I use yahoo pipes and you can see my attempt here:
http://pipes.yahoo.com/pipes/pipe.info?_id=0e72fee43090386fddbc9191f5cddc86

The pipes work up to the regular expression block.

The input to my regular expression block is:

Code:
<a rel="nofollow" target="_blank" href="http://thepeacearch.com/forum/showthread.php?t=16681" title="So, recently I've been looking for ways to make my online time more efficient. One thing I'm looking to do is find ways to combine information from...">My Enviornment rss Feed</a>



<div class="smallfont">

<span style="cursor:pointer;">s243a</span>

</div>


<div class="smallfont">Today <span class="time">02:47 AM</span></div>

 

 
<div class="smallfont" style="text-align:right;white-space:nowrap;">
Today <span class="time">02:47 AM</span><br />
by <a rel="nofollow" target="_blank" href="http://thepeacearch.com/forum/member.php?find=lastposter&amp;t=16681">s243a</a> <a rel="nofollow" target="_blank" href="http://thepeacearch.com/forum/showthread.php?p=295884#post295884"><img alt="" border="0" src="http://thepeacearch.com/images/lustrous/buttons/lastpost.gif" title="Go to last post"/></a>
</div>
 


<span class="smallfont">0</span> 


<span class="smallfont">3</span>

<span class="smallfont">0</span> 


<span class="smallfont">3</span>

I try to extract the title as follows:

Code:
^.*title=\".*\">(.*)<\/a>.*

the poster as follows;

Code:
^.*<span style=\"cursor\:pointer\;\"(.*)\<\/span\>.*

and the topic description as follows:

Code:
^.*title\=\"(.*)\".*

For each of the above regular expressions, the match is replaced with what is inside the brackets. Unfortunately none of my expressions are matching. I'm not sure what characters I need to escape but it is suppose to be based on perl and wikipedia tells me that all non alphanumeri characters in perl can be replaced by a backslash.
 
Last edited by a moderator:
Technology news on Phys.org
  • #2
Well, I don't know about yahoo pipes regexes, but in the absence of documentation (I didn't find any good documentation in a quick search) you might as well try experimenting.
Can you match:
horse
h(orse) (replace the orse with something else)
^.*horse
\"h(orse)\"
 
Last edited:
  • #3
I was able to figure most of what I want out with help from this post:

http://discuss.pipes.yahoo.com/Message_Boards_for_Pipes/threadview?m=tm&bn=pip-DeveloperHelp&tid=9741&mid=9742&tof=3&rt=2&frt=2&off=1

I'll I need to do now is figure out how to format the date:

http://discuss.pipes.yahoo.com/Message_Boards_for_Pipes/threadview?m=tm&bn=pip-DeveloperHelp&tid=9749&mid=9749&tof=1&frt=2
 
Last edited by a moderator:

1. What are regular expressions?

Regular expressions, also known as regex, are strings of characters used to define a search pattern. They are commonly used to find and manipulate text in large amounts of data.

2. How are regular expressions used in Yahoo Pipes?

In Yahoo Pipes, regular expressions can be used in the "Regex" module to filter and manipulate data from different sources. They can also be used in the "Loop" module to iterate through data and perform specific actions based on the defined pattern.

3. What is the advantage of using regular expressions in Yahoo Pipes?

The advantage of using regular expressions in Yahoo Pipes is that it allows for more precise and flexible data manipulation. With regular expressions, you can specify specific patterns or conditions that need to be met in order for the data to be included or excluded in the final output.

4. Are regular expressions case sensitive in Yahoo Pipes?

By default, regular expressions in Yahoo Pipes are case sensitive. However, you can use the "i" flag after the pattern to make it case insensitive. For example, "apple" would match "apple" and "Apple" when using the "i" flag.

5. Can regular expressions be used to extract data from URLs in Yahoo Pipes?

Yes, regular expressions can be used to extract data from URLs in Yahoo Pipes. You can use the "Regex" module to define a pattern that matches the data you want to extract, and then use the "Loop" module to iterate through the URLs and extract the data based on the defined pattern.

Back
Top