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 .
*** This bug has been marked as a duplicate of 9153 ***