As for the removning comment in a CS source code file you mentioned, if
we're not using the VS.NET ide, i think the only means is to define a
custom utility and programmatically load the cs file into string and parse
it, find all the comments start with "///" or "//" OR between "/* ...*/"
block.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Whilst I have not tried it I would have thought the standard replace method
within VisualStudio would work, using the Regular Expression feature it
supports.
I'll just type the file into find to create a file containing anything
except "//". Still good uses for dos utils I guess. Just thought VS may
have had it.
But there is, as mentioned in my previous posting. Use Regular Expression
feature of the Replace dialog box.
Bing up the standard VS search replace dialog, select the "Use option" and
select regular expression in the combo box. Enter a regular expression
similar to "///.*$" into the find text box to find one of the variations of
comments. It should be possible to come up with an expression to handle all
types of comments.
unfortunatly for me, that is problem. Every time I regex is involved, I end
up spending half the day trying to remember what I forgot and seeking the
right expression. Anyway, thanks and Cheers!
Actually you can also use the easier wild card option. Just simply enter //*
in the find box. This will replace both /// and // comments with a blank
line. But I guess this may not be suitable because it leaves a blank line
instead of removing it completly.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.