I have a little problem with preg_replace.
I need a function that removes all characters except [A-z][0-9] and .!?.
I could use preg_match, but this only verifies the string, and I want to remove the characters.
This is so I don’t end up putting junk characters like <p> and ;[[;[p;[
in the description META tag.
So the function must do this:
;")<br>kk23?! → brkk23?!
Any help would be appreciated 😀
Leaves: letters, numbers, spaces, .!?