is it possible to use a regular expression to remove all comments from a code file? for example, if i have a file with:
is there a way to specify a regexp pattern such that it will remove the comment. i wanted to do something like:
but that doesn't work. thoughts?
thanks,
glenn
Code:
here is some code
/* here
are some
comments */
here is some code
is there a way to specify a regexp pattern such that it will remove the comment. i wanted to do something like:
Code:
$codeFile -replace "/\*.*\*/",""
but that doesn't work. thoughts?
thanks,
glenn