Actually you can know exactly what an e-mail address should look
like; the form is defined in some RFC. The most general form of an
address is complicated and in fact cannot be expressed as a regular
expression. But it's reasonable to limit historical compatibility --
it's been some time since I've seen a bang path -- and with some
simplifying assumptions (in particular, limiting nested comments) one
can write regular expressions that can catch most addresses in use
today. There are plenty of them to be found on the web.
Charles Yeomans
On Apr 21, 2006, at 10:22 AM, Maarten de Vries wrote:
That works nice, but whats left to reject? I dont think you should
use a
mask thing at all, maybe check if it's a valid email at the end.
You can't
know exactly what an email adress should look like...
Maarten
On 21/04/06, Asher Dunn <[EMAIL PROTECTED]> wrote:
On Apr 20, 2006, at 10:02 PM, Thom McGrath wrote:
Does anybody know of a good mask for an e-mail address (in an
editfield, that is)?
I think you'd have to do custom mask-like filtering in the KeyDown
event. The Mask property restricts to a certain number of each
type of
character, and email addresses are variable length. Something like:
if isAlphaNumeric or ( isAt and not alreadyHaveAnAt ) or isDot then
// accept
else
// reject
end if
HTH
-- Asher
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>