in reply to pattern matching with specified length

I've read your question several times and still do not understand what you want to achieve. Perhaps you should show us the code that you are having trouble with and a small sample of the data. Show us the output you get and what you expected. Something of this nature should only require half a dozen lines of code and less than fifty characters of data to show the problem.

As the good Zaxo implies, XML and regex in one question is a triger here and we generally strongly suggest you use one of the many modules that know how to handle XML. A favourite is XML::Twig.


DWIM is Perl's answer to Gödel
  • Comment on Re: pattern matching with specified length