help-gnu-emacs
[Top][All Lists]
Advanced

[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
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]