develooper Front page | perl.beginners | Postings from May 2007

matching labels

Thread Next
From:
xavier mas
Date:
May 17, 2007 10:54
Subject:
matching labels
Message ID:
200705171952.01386.xaviermasr@ya.com
Hello list!

I have a little problem don't have how to solve regarding matching. I am 
working with xml files that contain labels marking the text inside them. I 
need to find for each of this lines labels that are the same and mix its 
contents up.

For instance: 

<LABEL1>CONTENT1></LABEL1><LABEL2>CONTENT2></LABEL2><LABEL1>CONTENT3
</LABEL1><LABEL3>CONTENT4</LABEL3>

i don't  know how to iterate over the line matching and mixing  up their 
contents if dont' use index and substring string functions inside a while 
loop, but this is much complicated.

)'m sure Perl has another simpler way to do ti, but can't figure out how. Any 
suggestions?

-- 
Xavier Mas

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About