s" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "David" <[EMAIL PROTECTED]>
Sent: Sunday, January 06, 2002 11:48 PM
Subject: RegEx speed (was: Using regexp to get a substring)
> That'll work, but on a finer point, if you need to be thinking about
> optimi
That'll work, but on a finer point, if you need to be thinking about
optimization at the moment:
($substring1 = $string) =~ s/.*\\(.*)/$1/;
is about 4 times slower than:
($substring2 = $string) =~ s/.*\\//;
because the second one doesn't have to store the matched value inside the
paren