Extrovertive
07-21-2002, 08:21 AM
<?php
$name = '@^#@#';
if(ereg("([[:punct:]]+)[[^:alnum:]]", $name)) echo "yes";
?>
ok, im a little stumped on regular expression. what im trying to do above is make sure th $name string contains all punctuation marks and not a single letter or numerial. however, it doesn't. why?
$name = '@^#@#';
if(ereg("([[:punct:]]+)[[^:alnum:]]", $name)) echo "yes";
?>
ok, im a little stumped on regular expression. what im trying to do above is make sure th $name string contains all punctuation marks and not a single letter or numerial. however, it doesn't. why?