|
From: | Kevin Rodgers |
Subject: | Re: extract regexp |
Date: | Thu, 17 Apr 2003 11:31:43 -0600 |
User-agent: | Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
lawrence mitchell wrote:
(with-temp-buffer (insert-file-contents-literally "prefs.js") (goto-char (point-min)) (condition-case err (re-search-forward regexp) (error (error "%s not found." regexp))) (setq server (match-string 1)))
Why not just let re-search-forward report the error itself? Or do (if (re-search-forward regexp nil t) (setq server (match-string 1)) (do-something-else)) -- <a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
[Prev in Thread] | Current Thread | [Next in Thread] |