in reply to Re: matching comments
in thread matching comments

The problem with this--and I don't know if it's actually going to be a problem for the OP, but in general, it might be--is that this will catch comments inside quoted strings. For example:
char * comptr = "Comment: /* In comment. */";
Your regular expression will match this, but it isn't actually a comment.

Again, this may not be an issue for the OP, but if it is, you should take a look at the the faq How do I use a regular expression to strip C style comments from a file?; perhaps you can extend this to your uses.