Re: Verifying email address format
From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 11/06/04
- Next message: Ali Mikati via AccessMonster.com: "displaying report margins and orientation on the form"
- Previous message: Steve Schapel: "Re: Send email from Access form"
- In reply to: John Vinson: "Re: Verifying email address format"
- Next in thread: John Vinson: "OT: Contradancing was: Re: Verifying email address format"
- Reply: John Vinson: "OT: Contradancing was: Re: Verifying email address format"
- Reply: Brown: "Re: Verifying email address format"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 6 Nov 2004 05:51:11 -0500
"John Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
news:ii8oo054t75bbj343mvhiv06fldg38grnc@4ax.com...
> On Fri, 5 Nov 2004 17:33:17 -0500, "Douglas J. Steele"
> <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
>
> >Depends on your definition of "lied".
> >
> >If you were to use Regular Expressions, it's quite easy. The difficult
part
> >is to come up with the appropriate pattern to match for. One possible
> >pattern is "^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$" That particular pattern
allows
> >any number of letters (no numbers) before the @ character, followed by up
to
> >three levels to the right of the @ character.
>
> Good suggestion - but not flawless.
>
> One of my (no longer active) email addresses was
> 74222.2372@compuserve.com; another I use resembles
>
> Love2Contradance@some.domain
>
> Even with regular expressions this is tough, since email addresses are
> VERY irregular!
I knew full-well that the Regular Expression pattern I suggested was flawed,
but it was the first one I found. There's a site devoted to sharing RexEx
patterns, but I couldn't remember its URL. It's http://www.regexlib.com
Actually, I don't think it should be that tough to get a working RegEx
pattern. I think the rules are fairly strictly as to what characters are
valid. While it's true that email addresses are irregular, you don't really
care what's before the @, as long as it's valid characters (some special
characters such as _ are valid, but I don't have the complete list). I'm
assuming that there's an appropriate standard out there somewhere for what's
a valid email address, in which case it's likely defined in terms of a
pattern. Doing a search on email at RegExLib.com turned up several good
candidates.
BTW, what's contradancing?
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!)
- Next message: Ali Mikati via AccessMonster.com: "displaying report margins and orientation on the form"
- Previous message: Steve Schapel: "Re: Send email from Access form"
- In reply to: John Vinson: "Re: Verifying email address format"
- Next in thread: John Vinson: "OT: Contradancing was: Re: Verifying email address format"
- Reply: John Vinson: "OT: Contradancing was: Re: Verifying email address format"
- Reply: Brown: "Re: Verifying email address format"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|