LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

View Poll Results: How do I like this thread
I am just adding this at random 0 0%
I like it 1 100.00%
I hate it 0 0%
Shit 0 0%
Voters: 1. You may not vote on this poll

Reply
 
Search this Thread
Old 04-22-2011, 12:38 AM   #1
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 421
Blog Entries: 28

Rep: Reputation: 2
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
 
Old 04-22-2011, 05:01 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl Search and Replace XML tags conditionally rammyp_1979 Programming 15 10-22-2010 09:11 AM
String match in perl user_28 Programming 7 09-16-2010 12:37 PM
Using key to match against source.txt file to add xml tags to names in Perl ginny2010 Programming 3 06-22-2010 01:16 PM
Using Perl Mods to edit mp3 meta tags ifeatu Linux - Software 3 12-06-2009 10:19 AM
perl pattern match question lluciano Programming 4 02-28-2006 05:59 AM


All times are GMT -5. The time now is 11:48 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration