Hello Januk, On Fri, 7 May 2004 09:58:36 -0700 (07.05.2004 22:58 my local time), received Saturday, May 8, 2004 at 10:47:26 +0600, you wrote about "Filtering email addresses out of message body" at least in part:
JA> I'm sure you could do it. :-) JA> The basic format is pretty much the same for all the templates I've JA> written. If (and when) I'll use it, I'll prefer using (for|while) cycles from MyMacros - for simplicity _and_ readability AL>> [_a-zA-Z\d\-\.\+]+@([_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+) JA> That's interesting. I didn't know that the + character was allowed in JA> the username portion of an address. Yes, sure... Read RFC-2822 as single correct source (well, with one addon - RFC address only SMTP-addressing scheme and doesn't cover X.400, UUCP transport) JA> According to that regexp, <[EMAIL PROTECTED]> is a valid e-mail JA> address. Yes. If MDA can handle "detail" part of address (after "+" sign), in can perform special processing of message, otherwise all messages with any details will be delivered to mailbox, assigned for user lucy (in your example) JA> If so, I wonder why TB doesn't recognize it as such. Small mistakes always possible JA> Also, did you know that you could have matched any alphanumeric JA> character with "\w"? Yes, but in my form I have regexp - directly expanded from RFC-2822 specification - independent from engine-specific regexp implementations (they can know nothing about POSIX extensions and even character classes) JA> Just one of those tidbits that might make your life a bit easier at JA> some point. :-) I prefer readability and manageability :-) (long life instead of easy life). -- Best regards, Alexander ________________________________________________________ http://www.silverstones.com/thebat/TBUDLInfo.html
