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

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

Re: Regexp replacement


From: David Kastrup
Subject: Re: Regexp replacement
Date: Sat, 28 Oct 2006 00:45:15 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Jim Dai <jgjimdai_p@yahoo.com> writes:

> I would like to delete \redtext{long text} with "long text" being kept.
> I have any instances in a file, with "long text" varying that may include
> other latex symbols like _ $. (assume there are not any {} pairs inside the
> text.
>
> How can I use regexp replacement to achieve the desired changes?

M-x query-replace-regexp RET \\redtext{\([^}]*\)} RET \1 RET

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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