;;-Ollie;; Precede each instance of an identifying char (single|group) within the source; string with a char (single|group);; text = (String) source string; iinsert = (String) text to insert in front of matches; identifier = (String) text to be preceded by the insert text in the source string(defun addMidText(text insert identifier / i ids textLen idLen insertionLen) (setq i 0) (setq textLen (strlen text)) (setq idLen(strlen identifier)) (setq insertLen (strlen insert)) (while(< (setq i (1+ i))(- textLen idLen)) (if(eq (substr text i idLen) identifier) (progn (setq text (strcat (substr text 1 (1- i)) insert (substr text i (- textLen (1- i))))) (setq i (+ i insertLen) textLen(+ textLen insertLen )) ) ) ) text)