Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!deejay!gear!cadlab!staff From: staff@cadlab.sublink.ORG (Alex Martelli) Newsgroups: comp.editors Subject: Re: ex search & substitution question Message-ID: <245@cadlab.sublink.ORG> Date: 10 Aug 90 12:08:25 GMT References: <3440001@hprnd.HP.COM> <26814@nigel.ee.udel.edu> Organization: CAD.LAB, Bologna, Italia Lines: 21 new@ee.udel.edu (Darren New) writes: >In article <3440001@hprnd.HP.COM> brent@hprnd.HP.COM (Brent McInnis) writes: >>But to perform it on a *range* of lines (say, lines 10 thru 20), I >>*want* to say >>:10,20/^#[iut]55/s/55/71/ >Try >:10,20g/^#[iut]55/s/55/71/ >I think you can give a range to the g command to have it operate on the lines >within the range that also match the pattern. -- Darren Or: :10,20s/\(^#[iut]\)55/\171/ -- Alex Martelli - CAD.LAB s.p.a., v. Stalingrado 45, Bologna, Italia Email: (work:) staff@cadlab.sublink.org, (home:) alex@am.sublink.org Phone: (work:) ++39 (51) 371099, (home:) ++39 (51) 250434; Fax: ++39 (51) 366964 (work only; any time of day or night).