in reply to Re: trim leading & trailing whitespace
in thread trim leading & trailing whitespace
Hi bart
In the example I gave above,
s/^\s*(.*?)\s*$/$1/gmthe combination of the \m modifier, and the line anchors ^ and $ will ensure the newlines are left alone
cheers
thinker
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: trim leading & trailing whitespace
by bart (Canon) on Mar 30, 2005 at 10:08 UTC | |
by thinker (Parson) on Mar 30, 2005 at 10:33 UTC | |
by tlm (Prior) on Mar 30, 2005 at 10:41 UTC | |
by bart (Canon) on Mar 30, 2005 at 11:10 UTC |
In Section
Seekers of Perl Wisdom