unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Easy regexp issue
@ 2007-01-18 18:32 HS
  2007-01-18 19:32 ` Joost Kremers
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: HS @ 2007-01-18 18:32 UTC (permalink / raw)


Hello everyone!

I'm finding this quite odd:
I want to replace all slashes for backslashes in a string, but i'm
having trouble!

Running this:
(replace-regexp-in-string "/" "\\" "c:/emacs/lisp/")
I get:
Debugger entered--Lisp error: (error "Invalid use of `\\' in
replacement text")

And if I try:
(replace-regexp-in-string "/" "\" "c:/emacs/lisp/")
I get:
Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 302
1)

So, I don't see any other options!
I know the problems is there because I replace for another string then
it works:
(replace-regexp-in-string "/" "x" "c:/emacs/lisp/")
"c:xemacsxlispx"

So, any ideas?

Thanks again!
HS

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-01-22 19:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-18 18:32 Easy regexp issue HS
2007-01-18 19:32 ` Joost Kremers
2007-01-19  7:28 ` Kevin Rodgers
     [not found] ` <mailman.3295.1169191738.2155.help-gnu-emacs@gnu.org>
2007-01-19  7:49   ` Barry Margolin
2007-01-19 13:29     ` HS
2007-01-22 19:26       ` Robert Thorpe
2007-01-20  6:09     ` Kevin Rodgers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).