?
Solved

Changing this regualr expression to allow @

Posted on 2012-09-11
3
Medium Priority
?
320 Views
Last Modified: 2012-09-11
I found this link

http://stackoverflow.com/questions/5260379/regular-expression-for-username

I want to change the regular expression to allow for @
is this correct?
[A-Za-z][A-Za-z0-9@._]{5,14} 

Open in new window

0
Comment
Question by:Camillia
  • 2
3 Comments
 
LVL 10

Expert Comment

by:mark_harris231
ID: 38388595
That is correct.  Did you try it and not get the desired results?  Are all the other conditions the same (i.e., 6-15 characters, always starts with an alphabetic character)?
0
 
LVL 7

Author Comment

by:Camillia
ID: 38388651
if min is 6 characters, howcome it has 5, instead of 6? [A-Za-z][A-Za-z0-9@._]{5,14}
0
 
LVL 10

Accepted Solution

by:
mark_harris231 earned 2000 total points
ID: 38388679
The first set of brackets takes care of the 1st character  [A-Za-z]

The remaining characters (2nd - 15th) are covered by the next set.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Loops Section Overview
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question