in reply to Match on line, read backwards to opening xml tag then forward to closing tag

If your data is proper XML always use one of the many XML parsing modules, it's lots easier than trying to get your code to handle all of the special cases. Try XML::Simple for a start.

  • Comment on Re: Match on line, read backwards to opening xml tag then forward to closing tag