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

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

bug#12622: replace-regexp-in-string


From: Andreas Schwab
Subject: bug#12622: replace-regexp-in-string
Date: Thu, 11 Oct 2012 18:52:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> (setq mystring "[.A foobar] [.B baz]")
> (replace-regexp-in-string "\\_<\\w+\\_>" (concat "\\\\" 
> (match-string-no-properties 0)) mystring) ==>
>
>  "[.A \\ext in that fi] [.B \\ext in that fi]"
>
> for example,
>
> Docstring says:
>
> "If it is a function, it is called with the actual text of each
> match, and its value is used as the replacement text."
>
> Which is not the case AFAIS.

You are not passing a function.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





reply via email to

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