this is my code
$re = '/[^\W][a-zA-Z\d.-]{3,20}/';
if(!preg_match_all($re, $username)){
do something
}else{
do somthing else
}
$username is a $_POST['username'];
when i submit a 3 letter word it works
but when i use symbols like $ and ! and etc it still goes through,
im trying to get a regex where the username is 4-20 characters long and only the alphabet and numbers and
dots and dash but dots and dashs cant be next to each other
thx