procmail
[Top] [All Lists]

Re: Matching literal dot in To

2015-06-14 08:43:30
On 14.06.15 08:30, Chuck Martin wrote:
On Sun, Jun 14, 2015 at 07:38:30PM +1000, Erik Christiansen wrote:
We need another tweak. This will be a great deal closer:

   * ^TO_.*\<[^.@ ]+\.[^.@ ]+@

That will not leap to the end of a mismatched address, but slide off it
in stages, because '\<' is only shorthand for `[^a-zA-Z0-9_]'. But we
needn't fuss over a lost microsecond here or there. It should do the job
now.

That will miss an address like abc(_dot_)def+ghi(_at_)example(_dot_)com.

That is not within the stated parameters. The stated goal is to detect
xxx.yyy@zzz But even if we assume that you have imagined a real need,
that does not mean that your "It may be necessary" is in any way
required.

Since '\<' is only shorthand for `[^a-zA-Z0-9_]', it is only necessary
to substitute the negative character class for the shorthand, and extend
it to [^a-zA-Z0-9_+].

Whether that is considered worth doing, we can but ask.

Erik

-- 
At the Victorian [era] version of the X Factor, the talent show format was
stripped right back to its bare bones. Just six contestants and a stage, each
and every man singing his heart out to impress the judges. While carrying a pig.
http://www.bbc.com/news/blogs-magazine-monitor-28982145
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>