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