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

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

I can't believe: replace string in a string (without tampering a buffer)


From: Swami Tota Ram Shankar
Subject: I can't believe: replace string in a string (without tampering a buffer) - does not exist
Date: Wed, 28 Mar 2012 19:05:03 -0000
User-agent: G2/1.0

Subject -  I can't believe: replace string in a string (without
tampering a buffer) - does not exist

Hello colleagues,

I am simply trying to replace a string by a string in another string.
This is so that can cook it, ie do replacements in a context without
having to match/coordinates/narrow/widen steps, and thus check prior
to running the final replacement. I prefer to be helped with a simple
lisp function, perhaps a lambda or some nested operations than a
defun.

I have done my homework before asking for help, and used the function
        replace-regexp-in-string
but the regexp is written as a string and can have wild-cards
characters so I dont like it as compared to a literal string. If there
is an option in it to make it literal easily without extensive
quoting, then I am not familiar with it.

I searched and found replace but could not figure out what it does.

My work is stuck on it and your help would be appreciated.

replace is an autoloaded Lisp function in `cl-seq'.
[Arg list not available until function definition is loaded.]
not documented

so I tried to use it (correctly or incorrectly) as follows and it
loaded

(replace "2" "3" "333222" )

replace is a compiled Lisp function in `cl-seq'.
(replace CL-SEQ1 CL-SEQ2 &rest CL-KEYS)

Replace the elements of SEQ1 with the elements of SEQ2.
SEQ1 is destructively modified, then returned.
Keywords supported:  :start1 :end1 :start2 :end2



Swami Tota Ram Shankar


reply via email to

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