Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #18265

Re: Email Vali8dation Problem

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post2.news.xs4all.nl!newszilla.xs4all.nl!not-for-mail
From Eric Bednarz <bednarz@fahr-zur-hoelle.org>
Newsgroups comp.lang.javascript
Subject Re: Email Vali8dation Problem
Organization Eric Conspiracy Secret Labs
References <amb6f9Fhvk3U1@mid.individual.net> <m28v7jsabf.fsf@nntp.bednarz.nl> <1k41g85n78el4646j3nv096jcrpn279hq9@4ax.com> <m2622m9svb.fsf@nntp.bednarz.nl> <o315g85pptcje0i59qmhk1ogu61tsdc1u9@4ax.com> <m2mwvxc783.fsf@nntp.bednarz.nl> <8m66g8hmmn9bjl5p1b2ikpia8e0vipbpem@4ax.com> <m2vcakg3tc.fsf@nntp.bednarz.nl> <bq57g85gm8s1rh9ichai6h1bh1tco4cl8q@4ax.com> <m2pq0suocp.fsf@nntp.bednarz.nl> <lvmwvwks8x.fsf@saunalahti.fi>
Reply-To ebednarz@gmx.net
X-Eric-Conspiracy There is no conspiracy
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Date Sat, 26 Jan 2013 15:46:22 +0100
Message-ID <m27gn0xarl.fsf@nntp.bednarz.nl> (permalink)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (darwin)
Cancel-Lock sha1:QBveUqfEOMKOXL/jreu/sCSCYic=
MIME-Version 1.0
Lines 34
NNTP-Posting-Host 83.163.169.80
X-Trace 1359211582 dreader36.news.xs4all.nl 6091 83.163.169.80:55425
Xref csiph.com comp.lang.javascript:18265

Show key headers only | View raw


Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> writes:

> Eric Bednarz <bednarz@fahr-zur-hoelle.org> writes:
>> Jeff North <jnorthau@yahoo.com.au> writes:
>
>>> [...] The only 'bad thing' I can
>>> see about the regexp is that it forces users to enter a correctly
>>> structured email address. 
>
>> Let's have another look then.
>> ^[a-z0-9_\-]+(\.[_a-z0-9\-]+)*@([_a-z0-9\-]+\.)+([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)$
>
>> On second thought, the only bad thing I can see is that you use
>> completely arbitrary rules for the local part and the domain part.
>
> Very restricting! That does not allow any national domains!

Yes it does. But it manages to get a lot of other things wrong. In no
particular order, and far from complete:

- No uppercase letters.
- A bunch of legal characters are not allowed in the local part
  (and that does not even include splitting hairs about quoted strings
  and commments.)
- The group in the local part is silly and just wastes memory.
- An underscore in the domain part?
- Putting IP addresses aside, a bunch of registered top level domains
  are missing; the real problem of course is that hard-coding any set
  of domains is an inherently stupid idea. If you really want to
  validate that a TLD is registered, use a web service that queries
  IANA. Seriously. nato? That was dumped in the nineties.


Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Email Vali8dation Problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-23 15:27 -0700
  Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-24 01:18 +0100
    Re: Email Vali8dation Problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-24 02:06 +0100
      Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-24 22:30 +0100
        Re: Email Vali8dation Problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-24 22:38 +0100
    Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-24 13:04 +1100
      Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-24 22:24 +0100
        Re: Email Vali8dation Problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-24 22:40 +0100
        Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-26 00:12 +1100
          Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-25 21:56 +0100
            Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-26 10:56 +1100
              Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-26 01:56 +0100
                Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-26 20:14 +1100
                Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-26 13:21 +0100
                Re: Email Vali8dation Problem Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-01-26 15:07 +0200
                Re: Email Vali8dation Problem "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-01-26 16:04 +0200
                Re: Email Vali8dation Problem Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-01-26 16:37 +0200
                Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-26 15:46 +0100
                Re: Email Vali8dation Problem Jeff North <jnorthau@yahoo.com.au> - 2013-01-27 10:30 +1100
  Re: Email Vali8dation Problem Andreas Bergmaier <andber93@web.de> - 2013-01-24 01:58 +0100
    Re: Email Vali8dation Problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-24 02:08 +0100
    Re: Email Vali8dation Problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-24 10:25 +0100
  Re: Email Vali8dation Problem Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-01-24 11:15 +0100
    Re: Email Validation Problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-24 08:53 -0700
      Re: Email Validation Problem Luc Yen <luc@goal.tw> - 2013-01-25 13:53 -0800
  Re: Email Vali8dation Problem Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-24 19:59 +0000
    Re: Email Vali8dation Problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-25 09:37 -0700
      Re: Email Vali8dation Problem Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-01-25 22:08 +0100
        Re: Email Vali8dation Problem Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-26 20:51 +0000

csiph-web