"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Wrapping regexp alternations in (?>...) is something I do by default. While there may be rare cases where this might be problematical, I haven't encountered any: it's something that doesn't hurt and, indeed, often helps. This usage is based on a "Perl Best Practices" guideline: Backtracking (page 269). It's summarised on page 271 as:
While I'm not a slave to all "Perl Best Practices" guidelines, this is one I have found to be useful. Update: s/have encountered/haven't encountered/ -- Ken In reply to Re^3: regex anchoring issue
by kcott
|
|