Hey there,
I asked a little while back how to replace everything but numbers and letters in a string? Well, I ended up with this code:
PHP Code:
$string = preg_replace('/ї^\wa-z0-9]/i', '', $string);
The only problem is that it removes hyphens (which is what I want) and doesn't remvoe underscorese (which is what I don't want)
Is there anyway I can make the above code not remove hyphens from a string of text?