In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (J. Younker) wrote:
> 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:]\.-_?/&=])"; You've already gotten a working substitute using the superior preg_replace function, but FWIW: the "invalid range" was caused by a misplaced hyphen. In the middle of a character class, it delimits a range; to use it as a literal, make it the last character in the character class. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php