Re: Case sensitivity in regular expressions
On Fri, Dec 28, 2001 at 12:40:26PM -0800, Gary Johnson wrote: On Fri, Dec 28, 2001 at 05:17:27PM +, Benjamin Smith wrote: Although the manual doesn't explicitly mention it, regular expressions in mutt seem to be case insensitive. So even although mutt supports [:lower:] and [:upper:], they do not work as expected and end up being equivalent to [:alpha:]. So does anyone know solutions to this, overrides in mutt, or any helpful patches. From the mutt manual: 4.1. Regular Expressions ... The search is case sensitive if the pattern contains at least one upper case letter, and case insensitive otherwise. So it may be that the pattern must contain at least one literal upper-case letter to be case-sensitive and that [:upper:] doesn't count for that. If using [:upper:] doesn't make the search case-sensitive, I would say that's a bug. A flea you mean :) I agree, [:upper:] should imply case-sensitivity. Probably an oversight rather than a bug. Should not be too difficult to change. -- Regards Cliff
Case sensitivity in regular expressions
Although the manual doesn't explicitly mention it, regular expressions in mutt seem to be case insensitive. So even although mutt supports [:lower:] and [:upper:], they do not work as expected and end up being equivalent to [:alpha:]. So does anyone know solutions to this, overrides in mutt, or any helpful patches. -- Benjamin Smith [EMAIL PROTECTED], [EMAIL PROTECTED] msg21986/pgp0.pgp Description: PGP signature
Re: Case sensitivity in regular expressions
On Fri, Dec 28, 2001 at 05:17:27PM +, Benjamin Smith wrote: Although the manual doesn't explicitly mention it, regular expressions in mutt seem to be case insensitive. So even although mutt supports [:lower:] and [:upper:], they do not work as expected and end up being equivalent to [:alpha:]. So does anyone know solutions to this, overrides in mutt, or any helpful patches. From the mutt manual: 4.1. Regular Expressions ... The search is case sensitive if the pattern contains at least one upper case letter, and case insensitive otherwise. So it may be that the pattern must contain at least one literal upper-case letter to be case-sensitive and that [:upper:] doesn't count for that. If using [:upper:] doesn't make the search case-sensitive, I would say that's a bug. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Spokane, Washington, USA http://www.spocom.com/users/gjohnson/mutt/ |
Re: Case sensitivity in regular expressions
On Fri, Dec 28, 2001 at 12:40:26PM -0800, Gary Johnson wrote: On Fri, Dec 28, 2001 at 05:17:27PM +, Benjamin Smith wrote: Although the manual doesn't explicitly mention it, regular expressions in mutt seem to be case insensitive. So even although mutt supports [:lower:] and [:upper:], they do not work as expected and end up being equivalent to [:alpha:]. So does anyone know solutions to this, overrides in mutt, or any helpful patches. From the mutt manual: 4.1. Regular Expressions ... The search is case sensitive if the pattern contains at least one upper case letter, and case insensitive otherwise. So it may be that the pattern must contain at least one literal upper-case letter to be case-sensitive and that [:upper:] doesn't count for that. If using [:upper:] doesn't make the search case-sensitive, I would say that's a bug. I must have missed that when I read that section. Thanks. Before I tried [:upper:] I tried [A-Z] and it didn't seem to work either (I was doing '~s [A-Z]' and it still showed messages *not* containing any upper case letters). Perhaps 'bracketed' things somehow miss the check for upper case letters. It probably doesn't check everything for upper case letters as (presumably) something like ~C shouldn't get taken as one. I had a quick glance at the source, but state machines and re compilers are not really *that* fun. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Spokane, Washington, USA http://www.spocom.com/users/gjohnson/mutt/ | -- Benjamin Smith [EMAIL PROTECTED], [EMAIL PROTECTED] msg21988/pgp0.pgp Description: PGP signature