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

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

Re: replacement in string


From: Ralf Angeli
Subject: Re: replacement in string
Date: Tue, 03 Jun 2008 09:31:33 +0200

* alruccaba@justmail.de (2008-06-03) writes:

> have an idea why this is it not working?:
> replace-regexp-in-string "/" "\\" "a / b")
> I just want to replace every "/" through an "\".
> Debugger entered--Lisp error: (error "Invalid use of `\\' in replacement 
> text")

You have to quote the backslash:
(replace-regexp-in-string "/" "\\\\" "a / b")

-- 
Ralf


reply via email to

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