https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6278

--- Comment #2 from Mark Martinec <[email protected]> 2010-01-07 09:00:11 
UTC ---
> - could you add a reference to this bug (bug 6278) in the comment?

Sure.

> - minor: I prefer (?:JAM|SPAM|) instead of (?:HAM|SPAM)? for clarity

Ok.

> - why use \z instead of $ ?

When I mean 'end of string', I prefer to say 'at end of string' (\z),
and not 'at end of string or at a newline at the end of a string even
though I know the newline cannot be there' ($).

Using a $ means I have to go to a mental exercise and prove that
a string cannot possibly have a newline character at its end.
Avoiding a $ possibly also saves perl a check for /\n?\z/.

Except in rare cases of parsing input lines, it is my view that using
a $ in regular expressions instead of a \z is always either wrong or
equivalent to \z.

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to