Bug #11461 Updated: \. after \- does not work

From: Date: Wed, 15 May 2002 14:07:08 +0000
Subject: Bug #11461 Updated: \. after \- does not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-7756@lists.php.net to get a copy of this message
ID: 11461 Updated by: webmaster@linuxconfig.de Reported By: aweber@multamedio.de Status: Bogus Bug Type: Regexps related Operating System: Linux 2.2.16-SMP PHP Version: 4.0.6RC3 New Comment: But using ARE, \- is a valid way to get a literal inside []'s Previous Comments: ------------------------------------------------------------------------ [2002-05-15 08:36:16] rasmus@php.net PHP does support ARE and again, this is not the issue here. ------------------------------------------------------------------------ [2002-05-15 07:50:41] webmaster@linuxconfig.de Maybe you shoud include both types and let the user decide with of them he wants to use. ------------------------------------------------------------------------ [2002-05-15 07:49:15] alxwe@t-online.de It depends whether you use the Extended Regular Expressions (as PHP does at the moment) or the Advanced Regular Expressions which have much more features. Both are defined by POSIX. Using ARE constructs like [0-9A-Za-z_\-\.] are right. If you want a "\" whithin the brackets you have to write "\\". The AREs are much easier to use and are more conclusive than the ERE. ------------------------------------------------------------------------ [2002-05-14 19:30:17] rasmus@php.net No I didn't. The problem has nothing to do with ^ vs. [^ The question is whether \- is a valid way to get a literal - inside []'s ------------------------------------------------------------------------ [2002-05-14 16:05:56] postings.php.net@hans-spath.de @rasmus: It sounds like you've mistaken "^" for "[^" ... http://sunsite.utk.edu/gnu/regex/regex_17.html#SEC17 http://sunsite.utk.edu/gnu/regex/regex_23.html#SEC23 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/11461 -- Edit this bug report at http://bugs.php.net/?id=11461&edit=1

« previous php.bugs (#7756) next »