[PHP] Regular Expression (for ereg(i))
if I want eregi to return false if the string contains char, for example, AB //false will be returned. what's the reg expression I can use? -- Regards, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular Expression (for ereg(i))
Hi Ns_Andy, Monday, October 14, 2002, 1:27:06 PM, I've got: N if I want eregi to return false if the string contains char, N for example, N AB //false will be returned. N what's the reg expression I can use? eregi will return false if there is no such expression; For Your example it will be: eregi (^[^]+$,AB) will return false. -- The Same, Steelmailto:[EMAIL PROTECTED] http://www.none.ru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Regular Expression (for ereg(i))
if(ereg(,$string)) { echo bad string; } else { echo good string; } If you're trying to do some HTML filtering, there are better ways to do it. ---John Holmes... -Original Message- From: Ns_Andy [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 5:27 AM To: [EMAIL PROTECTED] Subject: [PHP] Regular Expression (for ereg(i)) if I want eregi to return false if the string contains char, for example, AB //false will be returned. what's the reg expression I can use? -- Regards, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php