On Sat, 9 Mar 2002, Matthew Cline wrote:
> Why is "(?:" used in the rules regexps instead of just "("? 

Because a back-reference to that group is not needed.

> Does the engine that applies the rules put normal parens around the
> whole regexp, and we don't want to interfere with it generating $1, $2
> and such? 

I doubt that. :)

> Does "(?:" use less resources? 

Yes, substantially in some cases. It's a good optimization for most
regexp engines and, given that Perl was one of the originating places
for it[1], it's undoubtedly helpful there.

        Daniel

Footnotes: 
[1]  At least in popular use.

-- 
Bargaining is essential to the life of the world;
but nobody has ever claimed that it is an enobling process.
        -- Agnes Repplier

_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to