free stats

How to write regex to validate username with javascript

Asked 1 years ago in General Programming by Karmand Taher Answer

Hi all,

I have to validate the username in one of my projects with this format AAAAA_000000.


  • A = represents any character
  • 0 = represents any number.

How can I do this task with javascript?

1 Answer

Answered 1 years ago by Margo Shogren

Try the following regular expression to validate your usernames.

Add Your Answer

Answer Preview

By clicking "Post your answer", you agree to the terms,conditions and privacy policy of Terms & Conditions