RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern for Login Id
Expression
^([a-zA-Z](?:(?:(?:\w[\.\_]?)*)\w)+)([a-zA-Z0-9])$
Description
This Pattern is used to validate Login Name with . and _ seprators only.
Matches
amey_p, swars.k, anand5_king, addy_tom.16
Non-Matches
_amol.p, raj__vega5, 4aman_p, ashish..p
Author Rating: Not yet rated. Amol Pande
Source Own
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Minor adjustments
Name: d.samoylov
Date: 7/18/2017 9:44:31 AM
Comment:
My login (d.samoylov) wouldn't pass this one. So I changed regexp a little: ^([a-zA-Z](?:(?:(?:[\.\_]?)*)\w)+)([a-zA-Z0-9])$


Title: Little incorrect
Name: SuNcO
Date: 12/16/2009 12:28:55 PM
Comment:
The pattern works but not in all cases. It marks as valid raj__vega5


Title: Pattern doesn't work
Name: Alexander Kovtik
Date: 6/29/2007 8:44:10 AM
Comment:
Try to write in the address bar of your browser: /^([a-zA-Z](?:(?:(?:\w[\.\_]?)*)\w)+)([a-zA-Z0-9])$/.test('swars.k') The result is false. It means that the patterns doesn't work.


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials