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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -