in reply to Re: japhy blabs about regexes (again)
in thread japhy blabs about regexes (again)
Mmmhh, you are removing all the spaces from the string, this was not the original question. It was about removing whitespace (which includes \t, \r, \n, \f and your space) from the start and end of a string.
btw, you are using a character class in your regex where it is not necessary, so just write: s/ +//g; and for this task a regex is overkill, use a transliteration (tr) instead: tr/ //d;
-- Hofmator
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: japhy blabs about regexes (again)
by coreolyn (Parson) on Jul 17, 2001 at 20:09 UTC |