http://qs321.pair.com?node_id=294609


in reply to Re: Re: remove both leading and trailing spaces
in thread remove both leading and trailing spaces

If you want to know why, then I recommend you get a copy of Jeffrey Friedl's book "Mastering Regular Expressions". It explains exactly how this sort of thing works and the how to develop regular expressions efficiently.