Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!homxb!houxm!mhuxt!mhuxm!mhuxo!ulysses!allegra!mit-eddie!YALE.ARPA!ram-ashwin From: ram-ashwin@YALE.ARPA.UUCP Newsgroups: comp.emacs Subject: Negating REGEXPs, etc. Message-ID: <8706151852.AA02960@yale-eli.arpa> Date: Mon, 15-Jun-87 14:52:14 EDT Article-I.D.: yale-eli.8706151852.AA02960 Posted: Mon Jun 15 14:52:14 1987 Date-Received: Wed, 17-Jun-87 02:07:33 EDT Sender: pooh@eddie.MIT.EDU Lines: 18 1. How do I construct a regular expression that will search for any character that isn't part of a symbol? I know that "\\sw\\|\\s_" will search for anything that is a word constituent or a non-word symbol constituent, but how do I negate this? I need something like "[^\\sw\\s_]", but the "[^...]" construct only takes characters, not character descriptions. 2. a. Is there any way to negate regular expressions in general? b. Or OR or AND them? Something line (REGEXP-OR "foo" "bar") might be useful instead of "foo\\|bar", if only for readability. c. Is there an analog of "\\|" for AND? I couldn't find anything in (emacs)Regexp in the Info browser. -- Ashwin. ARPA: Ram-Ashwin@yale UUCP: {decvax,linus,seismo}!yale!Ram-Ashwin BITNET: Ram@yalecs