ereg() Alpha Numeric only...Except for the _ and space
Posted: Fri Jul 16, 2004 7:53 am
I'm using the following ereg() expression to determine if the string is only alpha or numeric.
Instead of returning true if the string is only alpha or numeric. How do I make it return true if the string is only alpha, numeric, an underscore or a space?
Code: Select all
<?php
ereg('[^A-Za-z0-9]', $dirName)
?>