I am trying to remove anything that is not alphanumeric, or a space with _:
$filename = preg_replace("([^a-zA-Z0-9]|^\s)", "_", $filename);
What I am doing wrong here does not seem to work. I tried several combinations of regular expressions ... (and I'm generally not very bright).
php regex alphanumeric
jonnnnnnnnnnie
source share