On Thu, 7 Dec 2000, Michael Turley wrote:
> Does anyone know of a utility to strip C style (/* */)
> comments from code. I have a rake of stuff with alot
> of CVSg material which I would like to remove. Does
> CVS have this type of functionality?
You could try something along the lines of:
perl -p -i.bak -e 's/oldstring/newstring/g' filename
The incantation for the comments would be something along the lines of
[\/*][a-zA-Z0-9-.,]*[*\/] though that may blow the machine up and do
irreprable harm. Perhaps some of the Regexp experts here could give the
right incantation.
Regards...jmcc
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!