Hi,

I'm using the jakarta_regexp_1.2.jar file and the following regexp
^(([A-Za-z0-9]+_)|([A-Za-z0-9]+\-)|([A-Za-z0-9]+\.)|([A-Za-z0-9]+))*[A-Za-z0-9]+$

I'm forbidding the following character pairs in the email address:
".-" or "-." or "--" or ".."
"._" or "_." or "-_" or "_-"

Bascially, any pair of ".", "-", or "_" combination should be rejected.

The behavior I'm seeing is if any of the pairs mentioned above is detected
at the beginning or in the middle of a 32 char string, the bad string is
detected and my code that alerts me appears.

However, if any of the pairs mentioned above is at the _end_ of the 32
char string (including a space or two spaces), the jsp page that I'm using
freezes.

Here is the summary of my findings:
30 char + ".." = 32 char total -> freeze
(30 characters followed by two periods results in a page freeze)
29 char + ".." = 31 char total -> freeze
28 char + ".." = 30 char total -> freeze
25 char + ".." = 27 char total -> freeze
24 char + ".." = 26 char total -> good!
23 char + ".." = 25 char total -> good!
22 char + ".." = 24 char total -> good!
21 char + ".." = 23 char total -> good! string caught, jsp page working
20 char + ".." = 22 char total -> good! string caught, jsp page working

So, 27 total characters and up, the page freezes.


Does anyone have an idea what the problem might be? Is it my regexp?

Any help is greatly appreciated.
Thank you,
Lily


--

-*-*-*-Lily Tsai-*-*-*-


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to