help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Emacs regexp problem


From: Xah Lee
Subject: Re: Emacs regexp problem
Date: Tue, 29 Jan 2008 15:14:30 -0800 (PST)
User-agent: G2/1.0

For a basic coverage of the diff between emacs and perl/python's
regex, see:

 http://xahlee.org/emacs/emacs_regex.html

  Xah
  xah@xahlee.org
∑ http://xahlee.org/

☄

On Jan 29, 10:00 am, "mailpitc...@email.com" <mailpitc...@email.com>
wrote:
> X-No-Archive:yes
>
> Hello, I'm doing an emacs replace-regexp and the regexp behaves
> differently from how it behaves in Python, and also differently from
> how I expect.
>
> I'm trying to add quotes around the parameter in a function call.
> I.e.:
> func(param) should be converted to func('param')
>
> I use the following command:
> M-x replace-regexp [enter] get\((.*)\) [enter] get('\1')) [enter]
>
> and the result is func(param) is converted to func('(param)')
>
> Why are those extra parentheses appearing in there; is this an error
> on emacs' part?
>
> Thanks



reply via email to

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