Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site hcr.UUCP Path: utzoo!hcr!doug From: doug@hcr.UUCP (Doug Moen) Newsgroups: net.unix Subject: editor query Message-ID: <519@hcr.UUCP> Date: Sun, 30-Oct-83 23:59:29 EST Article-I.D.: hcr.519 Posted: Sun Oct 30 23:59:29 1983 Date-Received: Mon, 31-Oct-83 00:05:19 EST Organization: Human Computing Resources, Toronto Lines: 15 How would you solve the following problem: I am in the editor, and would like to delete all lines within a specified range that contain a match for regular expression /A/, but *not* for regular expression /B/. For 'editor', substitute the name of your favourite text editor. The only way I can think of doing this in ed (or ex) is by typing , g/A/ .v/B/ d unfortunately, nested global commands are forbidden in ed and its relatives. Does *your* favourite editor provide a reasonable way to do this? If so, how, and where can I get a copy? Doug Moen {decvax,watmath,utzoo,cbosgd,ihnp4,logica,research}!hcr!doug