all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: steve-humphreys@gmx.com
To: steve-humphreys@gmx.com
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: [External] :  Use the characters "+" and "-" in regular expressions
Date: Thu, 20 May 2021 09:59:59 +0200	[thread overview]
Message-ID: <trinity-227e877b-c66e-4b57-859f-e22f03a48448-1621497598973@3c-app-mailcom-bs16> (raw)
In-Reply-To: <trinity-dde94f00-fc0f-4a83-83a9-7f2182b9bc30-1621491999210@3c-app-mailcom-bs08>

I wonder why I am getting 

Symbol's value as variable is void: message

(message " ")
(message "*** ***")
(setq s (string-match "[+]+"  "++++++++++++++++"))
message("%s" s)
(setq s (string-match "[+-]+" "++++++++++++++++"))
message("%s" s)
(setq s (string-match "[+-]+" "----------------"))
message("%s"  s)
 
> 
> 
> 
> 
> 
> > Sent: Thursday, May 20, 2021 at 9:59 AM
> > From: "Drew Adams" <drew.adams@oracle.com>
> > To: "tomas@tuxteam.de" <tomas@tuxteam.de>, "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> > Subject: RE: [External] : Re: Use the characters "+" and "-" in regular expressions
> >
> > > Hm. According to the docs, the dash should go last, but 
> > > a test actually confirms that it works in first position.
> > 
> > I quoted this from (elisp) `Regexp Special':
> > 
> >    To include a ‘-’, write ‘-’ as the first or last
> >                                       ^^^^^^^^^^^^^
> >    character of the character alternative, or as the
> >    upper bound of a range.  Thus, ‘[]-]’ matches both
> >    ‘]’ and ‘-’.
> > 
> > That's from Emacs 26 (and all prior releases, at least
> > as far back as Emacs 20).  But yes, they changed that
> > text for Emacs 27, to this:
> > 
> >    To include ‘-’, put it at the end.
> >                           ^^^^^^^^^^
> > ___
> > 
> > For Emacs 20, it says this:
> > 
> >    To include a `-', write `-' as the first or last
> >    character of the character alternative, or put it
> >    after a range.  Thus, `[]-]' matches both `]' and
> >    `-'.
> >
> 
>



  reply	other threads:[~2021-05-20  7:59 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 16:07 Use the characters "+" and "-" in regular expressions steve-humphreys
2021-05-19 16:17 ` Skip Montanaro
2021-05-19 16:26   ` steve-humphreys
2021-05-19 16:47     ` Yuri Khan
2021-05-19 17:39       ` steve-humphreys
2021-05-19 19:16         ` tomas
2021-05-19 19:27           ` tomas
2021-05-19 19:30         ` Yuri Khan
2021-05-19 21:32           ` tomas
2021-05-19 21:59             ` [External] : " Drew Adams
2021-05-20  6:26               ` RE: [External] : " steve-humphreys
2021-05-20  7:59                 ` steve-humphreys [this message]
2021-05-20  8:26                   ` tomas
2021-05-20  8:41                     ` steve-humphreys
2021-05-20  9:42                     ` steve-humphreys
2021-05-20  9:56                       ` tomas
2021-05-20 10:11                         ` steve-humphreys
2021-05-20 10:22                           ` tomas
2021-05-20 10:37                             ` steve-humphreys
2021-05-20 10:50                               ` tomas
2021-05-20 11:19                                 ` steve-humphreys
2021-05-20 11:27                                   ` steve-humphreys
2021-05-20 12:04                                     ` tomas
2021-05-20 11:31                                   ` Christopher Dimech
2021-05-20 11:40                                     ` steve-humphreys
2021-05-20 11:49                                       ` Christopher Dimech
2021-05-20 13:03                                       ` Jean Louis
2021-05-20 11:59                                     ` tomas
2021-05-20 12:53                                     ` Jean Louis
2021-05-20 12:46                               ` Jean Louis
2021-05-20 13:55                                 ` steve-humphreys
2021-05-20 14:14                                   ` Jean Louis
2021-05-20 14:28                                     ` steve-humphreys
2021-05-20 16:24                                       ` Yuri Khan
2021-05-20 16:34                                         ` steve-humphreys
2021-05-20 17:16                                           ` Eduardo Ochs
2021-05-20 18:29                                             ` Drew Adams
2021-05-21  5:48                                       ` Jean Louis
2021-05-20 10:29                         ` Negating a regexp Yuri Khan
2021-05-20 10:39                           ` tomas
2021-05-20 12:39                       ` [External] : Use the characters "+" and "-" in regular expressions Jean Louis
2021-05-20  7:15               ` Dash in regexp character classes: Beginnig vs. end [was: Use the characters "+" and "-" in regular expressions] tomas
2021-05-20  8:08                 ` Robert Pluim
2021-05-19 19:26       ` [External] : Re: Use the characters "+" and "-" in regular expressions Drew Adams
2021-05-19 19:25     ` Drew Adams
2021-05-19 16:27   ` tomas
2021-05-19 16:39     ` Skip Montanaro
2021-05-19 17:43       ` Marcin Borkowski
2021-05-19 19:10       ` tomas
2021-05-19 19:17 ` [External] : " Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=trinity-227e877b-c66e-4b57-859f-e22f03a48448-1621497598973@3c-app-mailcom-bs16 \
    --to=steve-humphreys@gmx.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.