ID: 11461 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] 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] [EMAIL PROTECTED] PHP does support ARE and again, this is not the issue here. ------------------------------------------------------------------------ [2002-05-15 07:50:41] [EMAIL PROTECTED] Maybe you shoud include both types and let the user decide with of them he wants to use. ------------------------------------------------------------------------ [2002-05-15 07:49:15] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] @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