サブルーチン
(defun re-search-forward-lb-la-1 (lb-regexp regexp la-regexp bound)
(let ((tmp-bound nil)
(not-found t))
(while (and not-found
(re-search-forward (concat "\\(" regexp "\\)\\(" la-regexp "\\)")
tmp-bound t))
(if (< bound (match-end 1))
(setq tmp-bound (1- (match-end 0)))
(goto-char (match-beginning 0))
(if (save-match-data
(re-search-backward (concat "\\(" lb-regexp "\\)\\=") nil t))
(progn (goto-char (match-beginning 1))
(re-search-forward regexp (match-end 1))
(setq not-found nil))
(goto-char (1+ (match-beginning 0))))))
(not not-found)))