NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Death to .* (Score:1)
Re:Death to .* (Score:1)
How, pray tell, is this particular regex going to backtrack needlessly? Or are you just cargo culting the “death to dot star” line?
(That said, the
.*in Robrt’s pattern is superfluous, as the pattern will match the exact same things with or without it.)Re:Death to .* (Score:1)
.*at the end was superfluous. He could have put them at both ends:/.*\._.*/. So, yes, I was cargo culting it. I was trying to draw attention to the fact that.*is almost never what you want to use.Re:Death to .* (Score:1)
“Death to dot star” is about backtracking. At the end of the pattern, the
.*won’t backtrack. If you put another one at the front, though, it will. What is your point?You would have made your case much better if you just said “the
.*there is a noop” instead of throwing in something entirely unrelated that happens to be about dot star.But you’re wrong. It is exactly what you want to use in many cases. You have to understand it, rather than using it blindly, sure, but that’s different from “it’s almost never what you want to use”. How would would you write this?
Reply to This
Parent
Re:Death to .* (Score:1)
Err, that is supposed to be a
=~there of course.