[PHP-DB] Wrong Parament count

2003-10-22 Thread Tonya
MYSQL and PHP 4.3.3 *sigh* I hate eregs and I'm really bad with them :/ I have a form that has a field in which the user is supposed to enter an IRC channel name. IRC channel names begin with a '#'. ereg(^#) does not work. I am getting the error Warning: Wrong parameter count for ereg()

Re: [PHP-DB] Wrong Parament count

2003-10-22 Thread Jason Wong
On Wednesday 22 October 2003 14:55, Tonya wrote: MYSQL and PHP 4.3.3 *sigh* I hate eregs and I'm really bad with them :/ I have a form that has a field in which the user is supposed to enter an IRC channel name. IRC channel names begin with a '#'. ereg(^#) does not work. I am getting

Re: [PHP-DB] Wrong Parament count

2003-10-22 Thread Jason Wong
On Wednesday 22 October 2003 16:15, Jason Wong wrote: $input_string = #ircchannel; if (preg_match(/^#[a-zA-Z]+/, $input_string) { echo Looks like an irc channel; } else { echo Go check your input; } Sorry that regex should look like: if (preg_match(/^#[a-zA-Z]+$/,