(defun somefunc ()
(interactive)
(let ((buf (save-excursion
(save-restriction
(widen)
(buffer-substring-no-properties (point-min) (point-max)))))
str)

(save-match-data
(while (and (setq str (read-string "input:"))
(string-match (regexp-quote str) buf))))

(insert (format "%s" (make-my-decoration str)))
))