Dr
Tue Jan 24 12:00:19 CST 2006
JRS: In article <uCmAfPFIGHA.3460@TK2MSFTNGP12.phx.gbl>, dated Mon, 23
Jan 2006 13:33:18 remote, seen in news:microsoft.public.scripting.vbscri
pt, James Whitlow <jameswhitlow@spamcop.net> posted :
>"Dr John Stockton" <jrs@merlyn.demon.co.uk> wrote in message
>news:04DxiWCxhR1DFwrf@merlyn.demon.co.uk...
>> JRS: In article <#gsBVr4HGHA.516@TK2MSFTNGP15.phx.gbl>, dated Sun, 22
>> Jan 2006 13:34:14 remote, seen in news:microsoft.public.scripting.vbscri
>> pt, James Whitlow <jwhitlow@letter.com> posted :
>> >"sneaky" <sneaky@the.riverbank> wrote in message
>> >news:uJH86e3HGHA.2444@TK2MSFTNGP11.phx.gbl...
>>
>> >> From: "Shmoe, Joe" <joe.shmoe@work.com>
> Give this pattern a try and see if it is more to your liking:
>
>oRegEx.Pattern = "[\w!#$%&'*+-./=?^`{|}~]+@[\w-.]+"
>
> If you think of any other examples that would trip up the above pattern,
>post them here and I will try and modify the pattern to correctly identify
>them.
That accepts my address.
But it also accepts jj@aa.bb..cc.jjj so it is not a validator -
which is harmless, since the only real test of an E-address is whether
it gets the mail to the right person. It also accepts .@. .
The OP's prime need, AFAICS, is to get whatever is within the denoters
< > and not to wonder about its validity; no more checking is needed, as
there should be no other < > present (but one could test for .+@.+\..+
in <> to guard against < > being characters in the recipient's language
- "jo<ej>im" <jj@aa.bb> should I think be valid.
And one might require the <jj@aa.bb> to be at the end of the line.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:
http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)