From: Noam Postavsky <npostavs@gmail.com>
To: Joe Riel <joer@san.rr.com>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Match empty string at begin/end of symbol
Date: Wed, 4 Jul 2018 15:21:07 -0400 [thread overview]
Message-ID: <CAM-tV--VU5gRAa3W5yiLK0xVN+4E=56UQjKHqgCsh2NiuBEeTA@mail.gmail.com> (raw)
In-Reply-To: <20180704114346.73df0142@gauss>
On 4 July 2018 at 14:43, Joe Riel <joer@san.rr.com> wrote:
> That returns "ab", as expected. Change the "\\<" to "\\_<"
> and it no longer matches. Why not?
>
> (let ((str "3+ab"))
> (and (string-match "\\_<[a-zA-Z][a-zA-Z0-9]*" str)
> (match-string 0 str)))
"+ab" all have symbol syntax in lisp-mode, try evaluating it from a
c-mode buffer and you will get "ab".
next prev parent reply other threads:[~2018-07-04 19:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 18:43 Match empty string at begin/end of symbol Joe Riel
2018-07-04 19:21 ` Noam Postavsky [this message]
2018-07-04 19:22 ` Eli Zaretskii
2018-07-04 19:37 ` Joe Riel
2018-07-04 19:25 ` Teemu Likonen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAM-tV--VU5gRAa3W5yiLK0xVN+4E=56UQjKHqgCsh2NiuBEeTA@mail.gmail.com' \
--to=npostavs@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=joer@san.rr.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).