Is there an easy way to remove all non alphanumeric characters from a string in PHP that wouldn't require listing them all individually in a regex function?
I have been using preg_replace("/[^a-zA-Z0-9\s\'\-]/", "", $my_string);
in the past but this filters out important characters like ÀÈÌÒÙß
etc.
I need to sanitize a name field, so monetary and mathematical characters/symbols are not needed.