ReachAndre
2007-07-16, 07:21 PM
Hello all,
I am trying to figure out how to use find and replace text in a lisp.
example
(defun c:fnr (/ oldtxt newtxt)
(setq oldtxt (getstring T "enter text to be replaced: "))
(setq newtxt (strcat (getstring T "enter text to replace (" oldtxt "): "))
(if
("text" = oldtxt)
(replace text with newtxt)
)
(princ))
This code would obviously not work, but I hope it gives averyone an idea of what I am trying to accomplish.
Thank you all in advance for your help,
Andre
I am trying to figure out how to use find and replace text in a lisp.
example
(defun c:fnr (/ oldtxt newtxt)
(setq oldtxt (getstring T "enter text to be replaced: "))
(setq newtxt (strcat (getstring T "enter text to replace (" oldtxt "): "))
(if
("text" = oldtxt)
(replace text with newtxt)
)
(princ))
This code would obviously not work, but I hope it gives averyone an idea of what I am trying to accomplish.
Thank you all in advance for your help,
Andre