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

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

Re: I can't believe: replace regexp in a string


From: David Kastrup
Subject: Re: I can't believe: replace regexp in a string
Date: 14 Feb 2003 10:11:22 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

kamphausen@creativepharma.com (Stefan Kamphausen) writes:

> Dear elispWizards,
> 
> somehow I can't believe it. When I try to replace a regexp in a string
> I have to create a temporary buffer and use the usual buffer
> replacement commands or write a loop over the sequence. Is that
> true?

No.

(let (pos)
  (while (setq pos (string-match "???" string ... pos))
    (setq string (replace-match ...)))

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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