Regular Expressions Help
| From: | J. Younker | Date: | Wed, 05 Jun 2002 15:22:16 +0000 |
| Subject: | Regular Expressions Help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-100738@lists.php.net to get a copy of this message | ||
Hi,
I'm trying to use eregi_replace to check a user-submitted URL, but I
keep getting the following error message:
Warning: Invalid range end in /var/www/html/_db_db/db_input.php
This what I'm using:
$pattern = "(http://)?([^[:space:]]+)([[:alnum:]\.-_?/&=])";
$replace = "http://\\2\\3";
$URL = eregi_replace($pattern, $replace, $URL);
I've stared at this expression for too long and can't figure out what's
wrong.
Thanks,
J. Younker