On Mon, 7 Jul 2008 10:17:12 +0100, "Dave Pawson" dave.pawson@gmail.com wrote:
Input text
- Representatives from <Sun> & <Novell> versions) & <Symphony>,
<KOffice>, <Google> Docs & Spreadsheets and Microsoft Office.
code
(defun msg(message) (format t "~%~A~%" message) )
(defun cleanup (line) "Replace < and & with entities" (msg (cl-ppcre:regex-replace-all "&" line "&")) (msg (cl-ppcre:regex-replace-all "<" line "<")) )
The first message replaces & The second shows that & has been changed back to &
You're applying REGEX-REPLACE-ALL to LINE in both cases. You probably want to apply it to the result of the first invocation in the second case instead.