I have the following lines of code: $title =ereg_replace("[^[:alnum:]]", " ", $_POST['title']); $title = ereg_replace(" +",' ',$title); Any inputed title will be shown, except for the special chars. My question is, how can I allow the following chars: ' and - Tnx in advance. p.s. i'm a newbie programmer