🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #2157

howto replace . with \. in a string..

#2157
From: David Spencer
Date: Thu, 21 Jan 1993 16:21
13 lines
758 bytes
I'm having trouble doing the following:

I have a string within elisp like "main.c" and I want to 
search for it in a file, so I want to convert it to "main\.c"
so that it matches exactly - but how to modify the string from
within elisp?

Do I have to write my own routine/loop and keep calling substring or
string-match?

		Thanks,
			Dave Spencer
			dspencer@retix.com
Technical Details
Message-ID: <1993Jan21.162113.26993@spock.retix.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!retix.com!dspencer

Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.help
Path: arc1-ca.pugleaf.net!sparky!uunet!retix.com!dspencer
From: dspencer@mproj.retix.com (David Spencer)
Subject: howto replace . with \. in a string..
Message-ID: <1993Jan21.162113.26993@spock.retix.com>
Sender: dspencer@spock.retix.com (David Spencer)
Organization: Retix, Santa Monica CA
Distribution: usa
Date: Thu, 21 Jan 1993 16:21:13 GMT
Lines: 15