#18714 [NEW]: preg_match requires double-escape for \ and /
| From: | dhoherd at actiontec dot com | Date: | Fri, 02 Aug 2002 21:19:01 +0000 |
| Subject: | #18714 [NEW]: preg_match requires double-escape for \ and / | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-15865@lists.php.net to get a copy of this message | ||
From: dhoherd@actiontec.com
Operating system: rh7.3 / win2kpro
PHP version: 4.2.2
PHP Bug Type: Regexps related
Bug description: preg_match requires double-escape for \ and /
using preg match to search for \ or / requires you to double-escape the
characters.
"/[\\\\\/]/" - works fine and mathches either \ or /.
"/[\\\/]/" - doesn't work, gives the error "Warning: Unknown modifier
']'"
--
Edit bug report at http://bugs.php.net/?id=18714&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18714&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18714&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18714&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18714&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18714&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18714&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18714&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18714&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18714&r=globals