[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vi



On Apr 14, Philippe Troin wrote
: 
: On Tue, 15 Apr 1997 08:34:53 +0300 Vadim Vygonets (vadik@cs.huji.ac.il
: ) wrote:
: 
: > Well, in vi you can do:
: > 1G				Go to the beginning
: > :%s/129.168.1/129.168.200/	(if I remember it right)
: > Still better...
: 
: To be a purist, the 1G isn't necessary.
: But your regexp will also match:
: 	129016801
: So it should be:
: 	:%s/129\.168\.1/129.168.200/g

Even better:

	:%s/\(192\.168\.\)1/\1200/g

If you append a `c' you'll be asked every time the pattern matches.


But this discussion tends to be religious ;-)

    Heiko
--
email : heiko@lotte.sax.de heiko@debian.org heiko@sax.de
pgp   : A1 7D F6 7B 69 73 48 35  E1 DE 21 A7 A8 9A 77 92 
finger: heiko@sax.sax.de         heiko@master.debian.org

Attachment: pgpRDOE8B2_ma.pgp
Description: PGP signature


Reply to: