From: Joost Kremers <joostkremers@yahoo.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Converting a non-escaped regexp to an escaped version
Date: 7 Jun 2007 14:35:06 GMT [thread overview]
Message-ID: <slrnf6g5r6.4h5.joostkremers@j.kremers4.news.arnhem.chello.nl> (raw)
In-Reply-To: mailman.1734.1181225695.32220.help-gnu-emacs@gnu.org
Nikolaj Schumacher wrote:
> On 2007-06-07, at 14:32, HippoMan wrote:
>
>> During development of elisp code that I'm writing, I test regular
>> expressions via the interactive use of M-x re-search-forward. Once
>> I've come up with a regexp that works, I often will want
>> to yank it into my elisp code, for example, into a call to
>> `match-string'.
>
> Not really a solution for your specific problem, but I'd suggest
> using `re-builder' for that.
it can be a solution, though: re-builder supports different forms of input
syntax. by default, it requires you to escape backslashes, so that when you
type C-c C-w to copy the regexp to the kill-ring, you get it with every
backslash escaped.
if you don't want to type the double backslashes, you can change
re-builders input syntax (with C-c TAB)from "read" to "string". then,
before typing C-c C-w change it back again to "read": re-builder will
automatically adjust the syntax and escape all backslashes for you.
it's a pretty neat package, that re-builder.
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
next prev parent reply other threads:[~2007-06-07 14:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 12:32 Converting a non-escaped regexp to an escaped version HippoMan
2007-06-07 14:14 ` Nikolaj Schumacher
2007-06-07 14:21 ` Juanma Barranquero
[not found] ` <mailman.1734.1181225695.32220.help-gnu-emacs@gnu.org>
2007-06-07 14:35 ` Joost Kremers [this message]
2007-06-07 15:12 ` HippoMan
2007-06-07 15:19 ` Joost Kremers
2007-06-11 9:31 ` Johan Bockgård
-- strict thread matches above, loose matches on Subject: below --
2007-06-07 21:25 martin rudalics
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=slrnf6g5r6.4h5.joostkremers@j.kremers4.news.arnhem.chello.nl \
--to=joostkremers@yahoo.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.