Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!hpl-opus!steinbac From: steinbac@hpl-opus.HP.COM (Gunter Steinbach) Newsgroups: comp.editors Subject: Re: vi: search for or go to a line not of length n Message-ID: <62420017@hpl-opus.HP.COM> Date: 25 Sep 90 16:08:12 GMT References: Organization: HP Labs, High Speed Electronics Dept., Palo Alto, CA Lines: 26 > / hpl-opus:comp.editors / lee@chsun1.uchicago.edu (dwight lee) / > 1:50 am Sep 25, 1990 / > Most uuencoded lines are 61 characters long. I'd like to be able to search > for a line that isn't 61 characters long. Any reasonably automated method > will do! Regexps, macros... anything. Just look for /...................................................................../ (Make that 61 dots - I didn't count mine.) > Also, is there a way for a search in vi to be inverted? ie "search for the > next line which does not begin with a capital M". This would also be good for > checking on mangled uuencoded files. That one is easy: /^[^M]/ The first caret anchors you at the front of the line, the caret inside square brackets inverts character- set search. You should not have "set ignorecase" on. Good luck! Guenter Steinbach gunter_steinbach@hplabs.hp.com