Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Regular Expressions - Email Validation

807603Jan 16 2008 — edited Jan 16 2008
According to RFC-2822 and RFC-2821 specifications the local part of email addresses are allowed to contain a whitespace character as long as it is within quotations. The rest of my regular expression works fine I am battling to find out how to match the above mentioned pattern. Here is the first part of my expression...


([\"(\\w|\\s|\\p{Punct}){1,}\"])



If there is a whitespace character I need to make sure it is surrounded with quotations

Any help will be much appreciated!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2008
Added on Jan 16 2008
18 comments
445 views