Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!nikhefh!stil From: stil@nikhefh.hep.nl (Gertjan Stil) Newsgroups: comp.lang.c Subject: Re: Want a way to strip comments from a Keywords: Comments Message-ID: <615@nikhefh.hep.nl> Date: 29 Mar 89 10:09:06 GMT Expires: 31 Dec 69 23:59:59 GMT References: <7150@siemens.UUCP> <9900010@bradley> <4895@cbnews.ATT.COM> Reply-To: stil@nikhefh.hep.nl (Gertjan Stil) Organization: Nikhef-H, Amsterdam (the Netherlands). Lines: 15 In article <4895@cbnews.ATT.COM> smk@cbnews.ATT.COM (Stephen M. Kennedy) writes: >In article <9900010@bradley> brian@bradley.UUCP writes: >> The following works in vi: :%s/\/\*.*\*\///g > >/* > * Unfortunately, multi-line comments aren't deleted. > */ What about the following command in vi: :%s/\/\*[.|\n]*\*\///g This will work for multi-line comments. Gertjan Stil