Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validate user name 2

Status
Not open for further replies.

GoldPearl

Programmer
Joined
Aug 9, 2005
Messages
64
can anybody suggest how i can validate a username in the form "jane.keen" entered in a textbox. the point between the firstname and last name is mandatory.

Cheers,
Gold Pearl.
 
>validate a username in the form "jane.keen"
Use the regexp pattern like:
[tt] /^\w.\w$/[/tt]
 
tsuji's regexp will match 1 alphanumeric character, followed by any character, followed by another 1 alphanumeric character.

A slight modification that should work correctly would be:
Code:
/^\w+\.\w+$/

-kaht

...looks like you don't have a job, so why don't you get out there and feed Tina.
headbang.gif
[rockband]
headbang.gif
 
Sure, you're right, kaht. Thanks for correcting.
- tsuji
 
No problem, even the best overlook things at times.

-kaht

...looks like you don't have a job, so why don't you get out there and feed Tina.
headbang.gif
[rockband]
headbang.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top