I am trying to make username validation with regex and PHP. The requirements are:
- No spaces
- Only lowercase letters and digits
- No special characters except (.),(-),(_) and the user cannot use two or more special characters together
- username should not start with special characters
- minimum length 6 and maximum 25
this is what I've done so far
/^[a-z0-9]{6,25}\S*$/