; within the prescribed limits, loop until a match is found
(goto-char left)
(re-search-forward regexp right nil 1)
(if (> (match-beginning 0) initial)
(signal 'search-failed (list regexp)))
(while (<= (match-end 0) initial)
(re-search-forward regexp right nil 1)
(if (> (match-beginning 0) initial)
(signal 'search-failed (list regexp))))
))
(defun bibtex-clean-entry ()
"For all optional fields of current BibTeX entry: if empty, kill the whole field; otherwise, remove the \"OPT\" string in the name; if text numerical, remove double-quotes. For all mandatory fields: if empty, signal error."