Hi mifflin,
You have to use '.+?' instead of '.+' to make non-greediness. Take a look at perlre.
As you said, if .xml is present after each records, then we can also use substitution or split function.
$file =~ s/(\.xml)/$1\n/g;
Prasad
In reply to Re: non-greedy piecewise matching
by prasadbabu
in thread non-greedy piecewise matching
by mifflin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |