Re: Email Regex
"Mark F. Murphy" <[email protected]>
| Newsgroups | gmane.comp.jakarta.oro.devel |
|---|---|
| Message-ID | <p05111b0eb9e62d1f8408@[192.168.9.116]> |
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 <mailto:[email protected]> Tyrell Software Corp <http://www.tyrell.com> ---------------------------------------------------------------------------