From: Teemu Likonen <tlikonen@iki.fi>
To: Douglas Lewan <d.lewan2000@gmail.com>,
help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Regular expression grouping not working?
Date: Sat, 08 Feb 2020 21:30:15 +0200 [thread overview]
Message-ID: <871rr4op14.fsf@iki.fi> (raw)
In-Reply-To: <02a28c91-d67d-e76a-c2a7-41b82d6b023f@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 697 bytes --]
Douglas Lewan [2020-02-08T14:17:54-05] wrote:
> I'm writing some code that includes the regular expression \\([^/]+/\\),
> (looking for a path on GNU/Linux) which doesn't match what I expect it
> should.
Maybe your backslash escaping is wrong. In regular expressions the
grouping is made with \( \) but within Lisp strings backslash has a
special meaning too and those must be escaped "\\( \\)".
> Is there something I'm missing?
I think we need more information about your code and input data.
--
/// OpenPGP key: 4E1055DC84E9DFF613D78557719D69D324539450
// https://keys.openpgp.org/search?q=tlikonen@iki.fi
/ https://keybase.io/tlikonen https://github.com/tlikonen
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 694 bytes --]
next prev parent reply other threads:[~2020-02-08 19:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-08 19:17 Regular expression grouping not working? Douglas Lewan
2020-02-08 19:30 ` Teemu Likonen [this message]
2020-02-08 19:48 ` Douglas Lewan
2020-02-17 0:15 ` Göktuğ Kayaalp
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=871rr4op14.fsf@iki.fi \
--to=tlikonen@iki.fi \
--cc=d.lewan2000@gmail.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.
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).