Regular Expression for username

Posted by neobie on Stack Overflow See other posts from Stack Overflow or by neobie
Published on 2010-05-17T05:39:25Z Indexed on 2010/05/17 5:50 UTC
Read the original article Hit count: 226

Filed under:

I need help on regular expression on the condition (4) below:

  1. Begin with a-z
  2. End with a-z0-9
  3. allow 3 special characters like ._-
  4. The characters in (3) must be followed by alphanumeric characters, and it cannot be followed by any characters in (3) themselves.

Not sure how to do this. Any help is appreciated, with the sample and some explanations.

© Stack Overflow or respective owner

Related posts about regex