Emacs Lisp 2
■ このスレッドは過去ログ倉庫に格納されています
0433デフォルトの名無しさん
NGNG"john(?=ney)" なら (re-search-forward-lb-la "" "john" "ney") とか
"(?<foo)bar" なら (re-search-forward-lb-la "foo" "bar" "") とかできるよ。
(defun re-search-forward-lb-la (lb-regexp regexp la-regexp
&optional bound noerror count)
(let ((lb-depth (regexp-opt-depth (concat "\\(" lb-regexp "\\)"))))
(when (re-search-forward (concat "\\(" lb-regexp "\\)"
"\\(" regexp "\\)"
"\\(" la-regexp "\\)")
bound noerror count)
(goto-char (match-beginning (1+ lb-depth)))
(re-search-forward regexp bound noerror count))))
■ このスレッドは過去ログ倉庫に格納されています