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


Groups > comp.os.linux.misc > #11782

Re: Write it in C...

From William Unruh <unruh@invalid.ca>
Newsgroups comp.os.linux.misc
Subject Re: Write it in C...
Date 2014-08-21 18:38 +0000
Organization A noiseless patient Spider
Message-ID <lt5ea9$677$1@dont-email.me> (permalink)
References (1 earlier) <lt47da$keh$1@speranza.aioe.org> <aq0hcbxs55.ln2@news.roaima.co.uk> <lt4rri$if6$1@news.albasani.net> <lt4t00$1qo$1@news.xmission.com> <lt563l$9ag$2@dont-email.me>

Show all headers | View raw


On 2014-08-21, Rich <rich@example.invalid> wrote:
> Kenny McCormack <gazelle@shell.xmission.com> wrote:
>> In article <lt4rri$if6$1@news.albasani.net>,
>> The Natural Philosopher  <tnp@invalid.invalid> wrote:
>> ...
>> >If its all that complicated I usually list all the cases and dust off 
>> >the C compiler.
>> >
>
>> I've known people like that.
>
>> For example, they write & maintain a suite of production reports in
>> C, rather than use something sensible like SAS.
>
>> Or AWK.
>
>> Or Perl/whatever.
>
>> P.S.  I strongly doubt a normal person could do this in C without
>> re-inventing reg exps.
>
> The problem with using regexp's to validate the syntax of email
> addresses is that RFC5322 format email addresses are surprisingly
> complex.  This page purports to show a regex that would work:
>
> http://blog.trojanhunter.com/2012/09/26/the-best-regex-to-validate-an-email-address/
>
> Validating, while allowing all RFC5322 corner cases, in any language,
> C, Perl, Regexp's, is not going to be a trivial task.

And of course the OP does not want to validate, but find, the regular
expressions. Ie, You first have to separate out the the email address
from surrounding garbage, and then validate it. 

Thus  &*&>> ;;; %868"7jf "baby doll"@apple_cider.com "7899
and differentiate it from

This is a "baby doll"@terrible.traffic;(*& 
which is not a valid email address.
I think even that url regexp would not manage. 




>

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Script to parse a text file and extract unique email addresses nomdeplume82008@googlemail.com - 2014-08-19 10:19 -0700
  Re: Script to parse a text file and extract unique email addresses Andreas Kohlbach <aug14.8.ankman@spamgourmet.com> - 2014-08-19 16:40 -0400
    Re: Script to parse a text file and extract unique email addresses The Natural Philosopher <tnp@invalid.invalid> - 2014-08-20 14:21 +0100
      Re: Script to parse a text file and extract unique email addresses nomdeplume82008@googlemail.com - 2014-08-20 08:52 -0700
        Re: Script to parse a text file and extract unique email addresses Andreas Kohlbach <aug14.8.ankman@spamgourmet.com> - 2014-08-20 18:26 -0400
          Re: Script to parse a text file and extract unique email addresses nomdeplume82008@googlemail.com - 2014-08-20 21:10 -0700
            Re: Script to parse a text file and extract unique email addresses Andreas Kohlbach <aug14.8.ankman@spamgourmet.com> - 2014-08-21 18:07 -0400
          Re: Script to parse a text file and extract unique email addresses Tim Watts <tw_usenet@dionic.net> - 2014-08-21 10:53 +0100
            Re: Script to parse a text file and extract unique email addresses Andreas Kohlbach <aug14.8.ankman@spamgourmet.com> - 2014-08-21 18:03 -0400
        Re: Script to parse a text file and extract unique email addresses Bill Marcum <bill.marcum57@yahoo.com> - 2014-08-21 03:34 -0400
          Re: Script to parse a text file and extract unique email addresses The Natural Philosopher <tnp@invalid.invalid> - 2014-08-21 12:12 +0100
          Re: Script to parse a text file and extract unique email addresses Chris Davies <chris-usenet@roaima.co.uk> - 2014-08-21 12:12 +0100
            Re: Script to parse a text file and extract unique email addresses The Natural Philosopher <tnp@invalid.invalid> - 2014-08-21 14:22 +0100
              Write it in C... (Was: Script to parse a text file and extract unique email addresses) gazelle@shell.xmission.com (Kenny McCormack) - 2014-08-21 13:42 +0000
                Re: Write it in C... (Was: Script to parse a text file and extract unique email addresses) The Natural Philosopher <tnp@invalid.invalid> - 2014-08-21 15:23 +0100
                Re: Write it in C... Rich <rich@example.invalid> - 2014-08-21 16:17 +0000
                Re: Write it in C... The Natural Philosopher <tnp@invalid.invalid> - 2014-08-21 18:42 +0100
                Re: Write it in C... William Unruh <unruh@invalid.ca> - 2014-08-21 18:38 +0000
        Re: Script to parse a text file and extract unique email addresses Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2014-09-24 13:18 +0000
          Re: Script to parse a text file and extract unique email addresses Doug Laidlaw <laidlaws@hotkey.net.au> - 2014-09-25 01:49 +1000
            Re: Script to parse a text file and extract unique email addresses Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2014-09-25 09:34 +0000
  Re: Script to parse a text file and extract unique email addresses Mladen Gogala <gogala.mladen@gmail.com> - 2014-09-29 00:17 +0000
    Re: Script to parse a text file and extract unique email addresses Rich <rich@example.invalid> - 2014-09-29 00:52 +0000
      Re: Script to parse a text file and extract unique email addresses gazelle@shell.xmission.com (Kenny McCormack) - 2014-09-29 01:13 +0000
    Re: Script to parse a text file and extract unique email addresses Tim Watts <tw_usenet@dionic.net> - 2014-09-29 07:40 +0100
    Re: Script to parse a text file and extract unique email addresses Eric Pozharski <whynot@pozharski.name> - 2014-09-29 09:52 +0300

csiph-web