[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[External] : Use the characters "+" and "-" in regular expressions
From: |
steve-humphreys |
Subject: |
[External] : Use the characters "+" and "-" in regular expressions |
Date: |
Thu, 20 May 2021 11:42:58 +0200 |
I have now used ";; [;+-.]+" to match some specific lines.
(string-match ";; [;+-.]+" s")
How could I negate the regexp that I have defined?
> Sent: Thursday, May 20, 2021 at 8:26 PM
> From: tomas@tuxteam.de
> To: steve-humphreys@gmx.com
> Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> Subject: Re: [External] : Use the characters "+" and "-" in regular
> expressions
>
> On Thu, May 20, 2021 at 09:59:59AM +0200, steve-humphreys@gmx.com wrote:
> > I wonder why I am getting
> >
> > Symbol's value as variable is void: message
>
> Because you are using it as a variable down there:
> >
> > (message " ")
> > (message "*** ***")
> > (setq s (string-match "[+]+" "++++++++++++++++"))
> > message("%s" s)
> ^^^ HERE
> > (setq s (string-match "[+-]+" "++++++++++++++++"))
> > message("%s" s)
> > (setq s (string-match "[+-]+" "----------------"))
> > message("%s" s)
> ^^^ AND HERE
>
> Now *STOP*.
>
> Think about it. How could you have debugged it yourself?
>
> That's the only way to improve.
>
> Cheers
> - t
>
- 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 <=
- 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
- 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