https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6645
--- Comment #31 from Karsten Bräckelmann <[email protected]> 2011-08-19 16:27:23 UTC --- (In reply to comment #30) > The comment was rather meant to make clear that the added expression is needed > for catching authenticated headers, which had no example (and which I also > forgot in the current patch :-( Adding examples or clarification is good, not questioning that. What I was referring to was the comment to "add example to explain the strange 0,1 expression". With an emphasis on strange. My point being, that quantifier indeed is strange, since it reads "0 or more, up to 1", which *is* zero or one. Which really is "optional". No confusion there, concerning the RE. An additional example might still be in order, to explain the issue. > > Also: While I see a \0 in the code following that RE, I don't see a \1 or $1 > > anywhere. Is a capturing subgroup really needed there? It's not a backreference, it's an unnecessary escape. > > /^\S+ (?:\(.{0,100}\) )?by \S+ \(.{0,100}\) with qmail-scanner/ > > (In reply to comment #29) > --> don't understand the "?:" in your expression, it looks much like It makes it a non-capturing group. All matches in plain parenthesis are capturing, that means they are available as \n or $n later. Whereas /(?:foo)/ is non-capturing, pure grouping, not having any effect on the numbering of $n. This is important, if the matches are used within or after the RE. -- Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
