February 14th, 2013, 04:04 AM
Print text between to "characters"
I'm new to perl and I would like to extract text between to strings. I would like to print all texts between <source> and </source> in a text file. The <source> and </source> could be on different rows.
=> print Text
=> Print Test1
February 14th, 2013, 09:23 AM
Looks like an XML file. If it is, the best way is to use an XML parsing module like XML::Simple.
If you want more help than that, please provide a sample file.
You should not use a regular expression for a job like this.