File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes regular expression email validation with wild card Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "regular expression email validation with wild card" Watch "regular expression email validation with wild card" New topic
Author

regular expression email validation with wild card

nagesh siddu
Greenhorn

Joined: Nov 09, 2005
Posts: 6
hi,
i am looking for a regular expression suitable for validating userinput from a JSP. the feild i am looking for is Email ID. this Textbox should accept wild card charecter(%).
has any one worked on this or any references to look.
regards,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35438
    
    9
Hello "nagsi nagsi"-

Welcome to JavaRanch. YOu may have overlooked that there is a naming policy governing screen names; you should correct yours accordingly.

If you just start out with RegExps, this web site may help you get going. If you just want an expression checking email addresses, a simple Google search will get you many examples.


Android appsImageJ pluginsJava web charts
nagesh siddu
Greenhorn

Joined: Nov 09, 2005
Posts: 6
hi,
Thanks for your suggestion. I will change my display name. I googled for the expression. i could get lot of expressions but none of them suit my requirement. this is for developing a search screen where a user can search by entering email id *with* wild chareter(%).

I got this from www.regexlib.com , but it has a restriction on the position of wild card.

\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$|^([0-9a-zA-Z'\.]{3,40})\*|([0-9a-zA-Z'\.]+)@([0-9a-zA-Z']+)\.([0-9a-zA-Z']+)$|([0-9a-zA-Z'\.]+)@([0-9a-zA-Z']+)\*+$|^$


any ideas to modify hte above.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: regular expression email validation with wild card
 
Similar Threads
Please share any Java code to do email validation
Jakarta RegExp - Email Validation
Text Content Filter For Email and Web Addresses
Text Content Filter For Email and Web Addresses
Regular expression for valid xml