Re: not sure why regex is doing this
| From: | Justin Patrin | Date: | Fri, 09 Jan 2004 18:57:03 +0000 |
| Subject: | Re: not sure why regex is doing this | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174165@lists.php.net to get a copy of this message | ||
while (eregi(',\s*,',$query)): $query = preg_replace('/,\s*,/',',NULL,', $query, -1); endwhile;Please don't mix the regex engines like that...it could lead to much suffering. instead of eregi, use preg_match. -- paperCrane <Justin Patrin>