Quick PHP question

MrScott81

Golden Member
Aug 31, 2001
1,891
0
76
I'm trying to clean an md5 string so it only contains a-z and 0-9 and using this code but it doesn't work...can someone help? If i exclude the ! it does exactly the opposite of what i want to do:

$key = preg_replace('#(![0-9a-f])#', ''", $key);