Re: Bad character class exception on pattern that works for JDK's Pattern class
Jim K <[email protected]> Thu, 12 Oct 2006 22:12:09 +0000 (UTC)
| Newsgroups | gmane.comp.jakarta.regexp.user |
|---|---|
| Message-ID | <[email protected]> |
I ran through a bunch of unit tests to validate that the RE compiled pattern operated the same as when compiled with either ORO's Perl5Compiler or Java's Pattern. I found that in one instance it did not: username@[email protected] I'd expect this pattern to fail the match and it does for ORO and Java. But it passes when run through Apache regexp. The pattern as amended is: ^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][\w-]*[0-9a-zA-Z]\.)+[a-zA-Z] {2,9})$