At 1:23 PM -0500 2002-10-07, Puneet Kishor wrote: >Bruce Van Allen wrote: >> At 1:01 PM -0500 2002-10-07, Puneet Kishor wrote: >> >>> s/ +/ /g; >>> >>> seems to work just as well. Which begs the question... why even have >>> \s? maybe because tmtowtdi?! >>> >> \s stands for "white space": [ \t\n\r\f]. > >yes, I know that ;-) > >which is why I am asking why do we even need \s since simply " " >seems to work just as well. I mean, it is kinda hard to put a tab or >a newline or a carriage return, etc., in a regexp... but a space is >easy...
Hmmm? " " doesn't match \t, \r, \n, or \f. Or are you talking about using '\s' in the replacement expression, i.e., B in "s/A/B/"? If so, '\s' is just 'backslash s'. 1; -- - Bruce __bruce_van_allen__santa_cruz_ca__