You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oro-dev@jakarta.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2002/10/30 17:41:02 UTC

Re: Email Regex

In message <p05111b12b9d9ed6db804@[10.0.1.2]>, "Mark F. Murphy" writes:
>Has anyone tried the regex that matches an internet email address?
>
>http://examples.oreilly.com/regex/email-unopt.pl
>http://examples.oreilly.com/regex/email-opt.pl

I think someone may have at one point and it blew the stack because of
some recursion.  I think the same thing happens in Perl, except the
stack grows more gracefully than in Java, where you may have to specify
in advance a largish stack.

>Would this be a good test case?

Definitely yes, with a good helping of email addresses.

daniel



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Email Regex

Posted by "Mark F. Murphy" <ma...@tyrell.com>.
At 11:41 AM -0500 10/30/02, Daniel F. Savarese wrote:
>In message <p05111b12b9d9ed6db804@[10.0.1.2]>, "Mark F. Murphy" writes:
>>Has anyone tried the regex that matches an internet email address?
>>
>>http://examples.oreilly.com/regex/email-unopt.pl
>>http://examples.oreilly.com/regex/email-opt.pl
>
>I think someone may have at one point and it blew the stack because of
>some recursion.  I think the same thing happens in Perl, except the
>stack grows more gracefully than in Java, where you may have to specify
>in advance a largish stack.

Well, I actually ended up doing it and it works great!

To be honest, I didn't do the full RFC 822 spec.... I left out the 
weird domain routing.

So my version is a subset of RFC 822.

I'll have to try the whole spec I suppose.

>  >Would this be a good test case?
>
>Definitely yes, with a good helping of email addresses.

Well, I have the class.... and I can add in the whole spec.

Actually, modifying the class to have a few options (like no domain 
routing) might be a good thing as well.

Hmmmmm.... where would we get email addresses to test?

There's several combinations to test the spec.

mark

-- 
---------------------------------------------------------------------------
  Mark F. Murphy, Director Software Development   <ma...@tyrell.com>
  Tyrell Software Corp                            <http://www.tyrell.com>
---------------------------------------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>