No... that first $1 is freezing at the wrong time. Perhaps you mean \2, not $1.$text =~ s/\s+|(STARTPRESERVE(\d?).*?STOPPRESERVE$1)/${[$1,' ']}[!$1]/ +gs;
-- Randal L. Schwartz, Perl hacker
In reply to •Re: Re: RegEx filter \s ! between labels, part 2
by merlyn
in thread RegEx filter \s ! between labels, part 2
by gryphon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |