On Friday, May 07, 2004, Januk Aggarwal wrote...

AL>> e-mails can be catched by this regexp

AL>> [_a-zA-Z\d\-\.\+]+@([_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+)

> That's interesting. I didn't know that the + character was allowed
> in the username portion of an address. According to that regexp,
> <[EMAIL PROTECTED]> is a valid e-mail address. If so, I wonder
> why TB doesn't recognize it as such.

Yes it is... I believe most SMTP servers treat anything after the +
sign as method of separation... ie, anything before the + is the real
mailbox, anything after the client could use to do filtering on. I've
seen postfix and sendmail working like this, and I believe qmail does
too.

> Also, did you know that you could have matched any alphanumeric
> character with "\w"? It saves a bit of work instead of having
> "a-zA-Z\d". Just one of those tidbits that might make your life a
> bit easier at some point. :-)

Does \w match high end characters like characters with umlauts? I'm
not sure those kind of characters are allowed in email addresses, and
if \w matches them, then it would make for a match on an invalid email
address... I'd have to dig up the RFCs to check.

-- 
Jonathan Angliss
([EMAIL PROTECTED])
Using The Bat! v2.10.01 on Windows XP 5.1 Build 2600 Service Pack 1

This tagline is umop apisdn
________________________________________________________

http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to