php - Regex blocking special characters -
i'm using php version 5.3.27
i'm trying regex match whitespace, , special characters such ♦◘•♠♥☻, other known special characters %$#&*@ matched, somehow ones mentioned before not matched..
current regex
preg_match('/^[a-za-z0-9[:space:]]+$/', $login)
my apology asking 2 questions on same subject. hope 1 clear enough you.
use this
[\w]+
will match non-word character.
Comments
Post a Comment