Utility to remove comments in vb.net files

L

lord.zoltar

neelu said:
I need a utility to remove all the comments from vb.net files

Thanks in advance

write a VB.NET program to do it?
should be easy: any line with a single quote as the first character
should be removed. and everything AFTER a single quote (even if it's
not the first character), provided the quote is not between a pair of
double quotes.
and the files you send to this program are any *.vb files.
 
L

lord.zoltar

IdleBrain said:
Why don't you just do a SEARCH & REPLACE for ' with a space?

;)
mmmm... yeah search and replace with a regular expression would
probably be quickest... I thought this guy really wanted a program that
did, uh, search and replace. oh well.
 
H

Herfried K. Wagner [MVP]

IdleBrain said:
Why don't you just do a SEARCH & REPLACE for ' with a space?

Because it's not always that easy:

\\\
Bla("Frank's book")
Foo() ' This and that. '
///
 

Ask a Question

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.

Ask a Question

Top