http://qs1969.pair.com?node_id=35111


in reply to (Dermot) Re: regexp's
in thread regexp's

AAAAAAARRRRRRRGGGGGGGGGHHHHHHHHH! I had them backwards!!!! I hate it when I do that!!!

Yes, I'm anal about the .* thing. I'm also anal about use strict, -w, checking that my open actually opened something, etc. I do see your point and I acknowledge that your regex is much simpler to read. However, iteration combined with dot star is begging for issues. In this case, though, since the backtracking appears to be small (just 4 characters, max) -- assuming that this is not just an over-simplified subset of data -- it's probably not that much of an issue.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just go the the link and check out our stats.