LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   perl match rss tags (http://www.linuxquestions.org/questions/programming-9/perl-match-rss-tags-876442/)

ted_chou12 04-22-2011 12:38 AM

perl match rss tags
 
Hi, I am trying to match the rss files with regex:
if I have a file here:

Code:

$content = get("$feed");
$content =~ "/\<item\>.*\<\/item\>/";

I want to match watever that is within the <item></item> tags and save it in the $content variable. however, the <item> tags can spread over multiple lines:
Code:

        <item>
<title>Test</title>
<link>http://netfriending.co.cc/</link>
<pubDate>2010-06-08 12:57:31</pubDate>
<description>
lots
of
content
here
</description>
</item>

Thanks,
Ted

MS3FGX 04-22-2011 05:01 PM

So, is the "SOLVED" tag just thrown on for kicks like the poll apparently was? Or have you actually solved this problem?

As a courtesy to the community, updating the original post with the verified solution is appreciated when marking a thread as SOLVED, as it makes the thread much more useful to future users who may have a similar problem. While on the subject of board etiquette, try to avoid posting random polls in the future.


All times are GMT -5. The time now is 01:50 AM.