Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!apple!oliveb!intelca!mipos3!omepd!merlyn From: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) Newsgroups: gnu.emacs Subject: Re: Matching multiple lines with regex Message-ID: <4220@omepd.UUCP> Date: 16 Mar 89 17:03:07 GMT References: <768@pcsbst.UUCP> Sender: news@omepd.UUCP Reply-To: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) Organization: Stonehenge; netaccess via BiiN, Hillsboro, Oregon, USA Lines: 18 In-reply-to: gaynor@athos.rutgers.edu (Silver) In article , gaynor@athos (Silver) writes: | "[^]" fails with an error (it would be nice if this were fixed even if just | this purpose, and "[]" for completeness), but "[\0-\255]" did the trick. The | same could have been performed at extra cost with "\(\n\|.\)". Ahh, but "[^]]" is a valid reg-ex, and matches any single character *but* the right bracket. Similarly, "[]]" matches *just* the right bracket. So, there is *nothing* to fix. True, there is no trivial way to say "everything" and "nothing", but so what. Now, how to match just a "["? :-) -- Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 on contract to BiiN (for now :-), Hillsboro, Oregon, USA. ARPA: <@intel-iwarp.arpa:merlyn@intelob> (fastest!) MX-Internet: UUCP: ...[!uunet]!tektronix!biin!merlyn Standard disclaimer: I *am* my employer! Cute quote: "Welcome to Oregon... home of the California Raisins!"