good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: Re: Re: remove both leading and trailing spacesby the_0ne (Pilgrim) |
on Sep 26, 2003 at 20:46 UTC ( [id://294540]=note: print w/replies, xml ) | Need Help?? |
One thing you want to watch with regex2...
... is if the variable has spaces contained in the phrase that you want to keep, this will get rid of them... regex1 and regex2 would retain the internal spaces.
In Section
Seekers of Perl Wisdom
|
|