in reply to Re: regexp - repeatedly delete words expressed in alternation from end of string
in thread repeatedly delete words expressed in alternation from end of string [regexp]
Note: You were using capturing parens ((...)) when you only needed non-capturing parens ((?:...)). Removing the need to capture greatly improves the speed of regexs.Thanks for this. Thing is, I have an entire module full of this mistake. Unless there is a pragma to fix this, then I have to go fix them all manually.
Ivan Raikov says: the first step to understanding recursion is to begin by understanding recursion.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: regexp - repeatedly delete words expressed in alternation from end of string (speed)
by tye (Sage) on Nov 06, 2007 at 18:26 UTC |
In Section
Seekers of Perl Wisdom