
January 30th, 2009, 12:14 AM
|
|
|
Quote: | Originally Posted by mwild8 crap nvm
/\s+/ |
Note that such a regex will also replace new line characters. To replace 2 or more spaces (or tabs) with a single space, you could do this (in Perl):
Code:
$str =~ s/[ \t]{2,}/ /g;
|