Gunnar Hjalmarsson schreef:

> 1. Why is rewriting so bad? Personally I need to look up those
> extended patterns, and letting the s/// operator rewrite a single dot
> is easier to read IMO.

That is exactly why I suggested that the 5.10.x regex-optimiser should
take care of that. But only if it pays off.
In Perl 5.8.8 your straight rewriting is actually about 40% faster than
my more complexe regex with "?<=".

I don't have to look up most of the extended patterns anymore, they
became familiar. The "?<=" and "?=" look like brothers to me. So I tend
to use them too often. :)


> 2. The OP said "another" digit, which I interpreted as a non-zero
> digit. I may have been wrong...

Yes, I understood that you took it that way, and that is why I pointed
out the special behaviour for the ".000" case.

-- 
Affijn, Ruud

"Gewoon is een tijger."


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


Reply via email to