[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting a non-escaped regexp to an escaped version

From: HippoMan
Subject: Re: Converting a non-escaped regexp to an escaped version
Date: Thu, 07 Jun 2007 15:12:02 -0000
User-agent: G2/1.0

On Jun 7, 10:35 am, Joost Kremers <address@hidden> wrote:
> 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.

Thank to all of you who suggested re-builder.  I can live with the
of its input syntax from "read" to "string".  Hey, I might write my
own function(s)
for automating even this!

reply via email to

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