Bug 15775 - Regex fails for a validation of large string (Email ID)
Summary: Regex fails for a validation of large string (Email ID)
Status: CLOSED DUPLICATE of bug 9153
Alias: None
Product: Regexp
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal with 1 vote (vote)
Target Milestone: ---
Assignee: Jakarta Notifications Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-03 10:53 UTC by Soumen Das
Modified: 2005-01-11 13:48 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Soumen Das 2003-01-03 10:53:21 UTC
I've used regex (using jakarta-regexp-1.2.jar) to validate email address . The 
code is as follows :
String email = "abc@abc.com"
String regExp = "^\\w+([_]*[\\-\\.]?[_]*\\w+[_]*)*@\\w+([_]*[\\-\\.]?[_]*\\w+[_]
*)*(\\.\\w{1}\\w+)+$";
          try {
  	      RE reg = new RE(regExp);
              if(!(reg.match(eMail))) {
  		return false;
              }
          } catch(Exception e) {
              return false;
          }
          return true; 


Now if I pass email address as a big one e.g. 
abcyz1234567890abcyz1234567890abcyz1234567890@abwxycom  which is a wrong one, 
the system hangs .
Comment 1 Vadim Gritsenko 2003-05-02 02:02:57 UTC

*** This bug has been marked as a duplicate of 9153 ***