Re: [PHP] minus in [] groups in ereg
So sprach »Andrew Perevodchik« am 2001-09-13 um 18:32:03 +0300 : > Is this a bug or feature? The only way to include Feature. See the manual or maybe perldoc perlre. You don't need to escape it, if you put it as the very first item, like so: [-A-Z0-9] Also, why are you escaping =, %, . and _ inside the character class? I'm not sure, but I don't think it's needed. > [[A-Za-z0-9\_\-\=\%\.]] won't work with "-" as it is supposed to > [[A-Za-z0-9\_\=\%\.\-]] is ok And finally - why two [ and ]? Why not just 1 of each? Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 15 hours 4 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re[2]: [PHP] minus in [] groups in ereg
> JK> Feature. By placing a "dash" next to the > JK> bracket, there is no confusion that the dash > JK> is being used to specify a range. > > Doesn't slash before dash mean that??? Could be, I don't know. I always put a dash next to the bracket, instead of escaping it with a backslash. As is often the case, there is more than one way to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] minus in [] groups in ereg
Hello! You wrote: JK> Feature. By placing a "dash" next to the JK> bracket, there is no confusion that the dash JK> is being used to specify a range. Doesn't slash before dash mean that??? -- Andrew Perevodchik [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] minus in [] groups in ereg
Feature. By placing a "dash" next to the bracket, there is no confusion that the dash is being used to specify a range. Kirk > -Original Message- > From: Andrew Perevodchik [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 13, 2001 9:32 AM > To: [EMAIL PROTECTED] > Subject: [PHP] minus in [] groups in ereg > > > Is this a bug or feature? The only way to include > a minus characher in [] groups in regex is to put > \- right gefore ] > > [[A-Za-z0-9\_\-\=\%\.]] won't work with "-" as it is supposed to > [[A-Za-z0-9\_\=\%\.\-]] is ok > > Uh? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] minus in [] groups in ereg
Is this a bug or feature? The only way to include a minus characher in [] groups in regex is to put \- right gefore ] [[A-Za-z0-9\_\-\=\%\.]] won't work with "-" as it is supposed to [[A-Za-z0-9\_\=\%\.\-]] is ok Uh? -- Andrew Perevodchik [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]