| 
 Posted by jamen on 02/18/06 20:48 
MS wrote: 
 
> I have $field 
>  
> Which contains anything... but I want to remove everything that is not 
> a-zA-Z0-9 or a space... 
 
 
$result = preg_replace("/[^a-z\\d ]/i", "", $field); 
 
putting a ^ as the first character in the class negates it
 
  
Navigation:
[Reply to this message] 
 |