[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Use the characters "+" and "-" in regular expressions
From: |
tomas |
Subject: |
Re: [External] : Use the characters "+" and "-" in regular expressions |
Date: |
Thu, 20 May 2021 11:56:03 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, May 20, 2021 at 11:42:58AM +0200, steve-humphreys@gmx.com wrote:
> I have now used ";; [;+-.]+" to match some specific lines.
>
> (string-match ";; [;+-.]+" s")
^ NOOOO!
This is a dash in the middle, indicating a range (i.e. "match all
characters in the range "+" to "."). In ASCII (and by extension,
in UTF-8), these are "+", ",", "-" and ".".
So this will match...
(string-match "[+-.]" "Folks, let's go!")
=> 5
... the comma!
This is the whole discussion we've had just yesterday and today.
I'm a bit confused: you seem to have ignored it totally.
> How could I negate the regexp that I have defined?
I don't even know what you mean by "negating a regexp".
Cheers
- t
signature.asc
Description: Digital signature
- Re: Use the characters "+" and "-" in regular expressions, (continued)
- Re: Use the characters "+" and "-" in regular expressions, Yuri Khan, 2021/05/19
- Re: Use the characters "+" and "-" in regular expressions, tomas, 2021/05/19
- RE: [External] : Re: Use the characters "+" and "-" in regular expressions, Drew Adams, 2021/05/19
- Re: RE: [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, tomas, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions,
tomas <=
- Re: [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, tomas, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, tomas, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- Re: [External] : Use the characters "+" and "-" in regular expressions, tomas, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, Christopher Dimech, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, steve-humphreys, 2021/05/20
- [External] : Use the characters "+" and "-" in regular expressions, Christopher Dimech, 2021/05/20