Regular Expression
-
Thanks to reply for the previous question.I need regular expression for the following questions. 1.I need to accept e-mail address for user name.Which can accepts letter,numbers,".","@". How to do regular expression for this... 2.I need to accept only letters, numbers.i tried this one. ^([0-9]*[a-z]*[A-Z]*)$, but it is giving error in some case.one of the example is "dfdfdfdf1234", it generates error on entering this value. Suresh.P.S
-
Thanks to reply for the previous question.I need regular expression for the following questions. 1.I need to accept e-mail address for user name.Which can accepts letter,numbers,".","@". How to do regular expression for this... 2.I need to accept only letters, numbers.i tried this one. ^([0-9]*[a-z]*[A-Z]*)$, but it is giving error in some case.one of the example is "dfdfdfdf1234", it generates error on entering this value. Suresh.P.S
1. Here's one that I use: "^[a-z][\w\.\-%~]*@[\w\.\-]+\.[a-z]{2,4}$". It's based on the standard for e-mail addresses, but it might be a bit more strict than you want, as some people have e-mail addresses that doesn't conform to the standard. 2. Put the ranges in the same set: "^([0-9a-zA-Z]*)$". --- b { font-weight: normal; }
-
1. Here's one that I use: "^[a-z][\w\.\-%~]*@[\w\.\-]+\.[a-z]{2,4}$". It's based on the standard for e-mail addresses, but it might be a bit more strict than you want, as some people have e-mail addresses that doesn't conform to the standard. 2. Put the ranges in the same set: "^([0-9a-zA-Z]*)$". --- b { font-weight: normal; }
http://regxlib.com/CheatSheet.aspx[^], also you could try this application "RegexDesigner.Net" from http://www.sellsbrothers.com/[^]