basically i am generating a filename from user input so
user inputs the title of the page, as :
"Guide to fishing/eating with cheese"
obvoiusly i dont want the " and the /, all i want is the alpha numeric characters and the spaces
i've used
$filename = ereg_replace("[^[:alnum:][:space:]]","", $filename);
to remove all non-alphanumeric characters leaving spaces
and then
$filename = ereg_replace("[[:space:]]","_", $filename);
to convert the spaces to underscores.
that works great (i think) what would be nice is to make it one expression for good housekeeping.
Cheers,
nozom