how to use eregi to only allow characters and underscore?
Moderator: General Moderators
how to use eregi to only allow characters and underscore?
i new to php, how to use eregi to only allow characters and underscore? because http://us.php.net/manual/en/function.eregi.php only show basic usage of eregi! can anyone teach me or show me the code? please help me

Re: how to use eregi to only allow characters and underscore?
Code: Select all
if (!eregi('^[a-z_]*$',$yourString)) die('your string does not fit my needs madam!');