Utility to remove comments in vb.net files

  • Thread starter Thread starter neelu
  • Start date Start date
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.
 
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.
 
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. '
///
 
Back
Top