$Bill Luebkert wrote:
>          Rate  RE2  RE5  RE3  RE4  RE1 RE1a
> RE2  136761/s   -- -58% -61% -64% -74% -74%
> RE5  326584/s 139%   --  -6% -14% -37% -37%
> RE3  347705/s 154%   6%   --  -9% -33% -33%
> RE4  381098/s 179%  17%  10%   -- -26% -26%
> RE1  516529/s 278%  58%  49%  36%   --  -0%
> RE1a 516529/s 278%  58%  49%  36%   0%   --
> 
> 1  $str =~ s/\s(?=\s*\S)/0/og;
> 1a $str =~ s/\s(?=\s*\S)/0/g;
> 2  1 while ($str =~ s/\s(?=(\d|\.))/0/);
> 3  $str =~ s/^(\s+)(?=\d)/'0' x (length $1)/e;
> 4  $str =~ s/^(\s+)/sprintf "%s", q[0]x length($1)/eg;
> 5  $str =~ s/ (?=.*\d)/0/g;

What surprises me is the substantial difference between the lookahead
expressions, RE1a and RE5. Can anyone explain why there's such a
difference?

- Mark.


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to