Title |
Test
Find
Pattern Title
|
Expression |
(?=^.{6,51}$)([A-Za-z]{1})([A-Za-z0-9!@#$%_\^\&\*\-\.\?]{5,49})$ |
Description |
This expression was originally developed for user names. Matching text must have 6 - 50 characters, cannot contain spaces, must begin with an alpha character, can contain mixed case alpha, digits, and the following special characters:
! @ # $ % ^ & * - . _ ? |
Matches |
|
Non-Matches |
1234567890 | aB1()[]{};:'",<>/\_=0Yz | !exclaUser |
Author |
Rating:
John Tobler
|
Source |
|
Your Rating |
|
Title: Thanks for the RegEx
Name: Gagan
Date: 7/28/2008 7:22:45 AM
Comment:
I modified your Pattern. I took a more general approach.
(?=^.{3,21}$)([A-Za-z]{1})([A-Za-z0-9_\.]{2,20})$
It accepts user names which are of length 3-20 Characters
Special Characters allowed: . and _
I think more special characters, more SQL Injection.