my @temp = split /(STARTPRESERVE.*?STOPPRESERVE)/; my $output = ""; while (@temp) { local $_ = shift @temp; s/\s+/ / unless @temp % 2; $output .= $_; }
-- Randal L. Schwartz, Perl hacker
In reply to •Re: •Re: RegEx to filter \s not between labels
by merlyn
in thread RegEx to filter \s not between labels
by gryphon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |