Peter Rabbitson wrote:
$str =~ s/          / /i;
$str =~ s/         / /i;
$str =~ s/        / /i;
$str =~ s/       / /i;
$str =~ s/      / /i;
$str =~ s/     / /i;
$str =~ s/    / /i;
$str =~ s/   / /i;
$str =~ s/  / /i;

is the same as:

$str =~ s/\s{2,10}/ /;

Not quite. The \s character class includes more than just the ' ' character.


John -- use Perl; program fulfillment

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to