Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by Enoch (3329) on 2006.05.03 0:05 (#47527) Homepage
    Death to Dot Star! [perlmonks.org]
    • 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.)

      • Yes, I was invoking it in the "Cargo Cult" context. The .* 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.
        • “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.

          I was trying to draw attention to the fact that .* is almost never what you want to use.

          But you’re wrong. It is exactly what you wa