jakarta-oro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kumar, Vasanth" <Vasan...@InterWorld.com>
Subject RE: Infinite Loop or Just taking too long ?
Date Tue, 25 Feb 2003 22:06:56 GMT
Sorry, it seems that my attachment didn't make it through in my prior email.

And here is how I ran it:

java TestRegex ^[A-Za-z0-9#_!'\(\)\-]+([A-Za-z0-9#_!'\(\)\.\-]+)*@[A-Za-z0-9#_!'\(\)\-]+[\.]+([AZa-z0-9#_!'\(\)\.\-]+)+$

-----Original Message-----
From: Kumar, Vasanth 
Sent: Tuesday, February 25, 2003 4:56 PM
To: oro-user@jakarta.apache.org
Subject: Infinite Loop or Just taking too long ?


We use ORO in our application for to provide regular expression capability.  One of our users
had created an email validation expression as follows:

As you can see, this is inefficient and can be simplified to (at least) the following:

However, the original expression seems to hang ORO when given a long, invalid, email.
(Though I must admit I don't know whether it is hanging or just taking a really long time.)

An example of an email that seems to slow it down/hang is:

Note that valid emails are evaluated successfully (i.e. abcdefghijklmnopqrstuvwxyz1234567890@yahoo.com
doesn't hang ORO).

I am enclosing my test case as well.

This seems to be an issue in the latest version - 2.0.7.

View raw message