Philip Guenther suggested to Timothy Luoma,
L> Is there any way to trim down my line:
L> * ^TO(_dot_)*\+(_dot_)*(_at_)luomat\(_dot_)peak\(_dot_)org
L> or is that as good as it gets?
G> Well, it's actually too general, as it'll match the following:
G> To: bob+foo(_at_)elsewhere,
luomat(_at_)luomat(_dot_)peak(_dot_)org
G> The following is closer, though it's not perfect. Truly correct code would
G> require a full rfc822 parser, which is more work than it's worth for this.
G> * ^TO[a-z]+\+[-a-zA-Z0-9_(_dot_)]*(_at_)luomat\(_dot_)peak\(_dot_)org
But that won't match
To: bob(_at_)elsewhere,
spamme2+ilovespam(_at_)luomat(_dot_)peak(_dot_)org
Let's try this:
* ^TO.*\+[^,]*(_at_)luomat\(_dot_)peak\(_dot_)org
as long as there are no commas between the plus sign and Timothy's domain,
we can figure that the plus sign is for his address.