in reply to Re: Re: TIMTOWTDI
in thread LCCS time complexity
Thanks for the $text =~ s/\[[^\]]*\]/ /g; tip; that is better. As for the /m
on these
I think I'd put the /m on the third RE$text =~ s/^\s+//; $text =~ s/\s+$//;
so taken together the triple REs mean: "remove leading whitespace, trailing whitespace, and make all interior whitespace (even across line breaks) into single spaces".$text =~ s/\s+/ /m; #yes?
Many thanks for the OT-but-useful teaching!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: TIMTOWTDI
by tachyon (Chancellor) on Sep 11, 2003 at 10:54 UTC |
In Section
Seekers of Perl Wisdom