in reply to Regex to strip comments

"This has probably been asked and answered a thousand times over already, but I have not found a working solution."

There are tools available to do this. They're called search engines!

I searched for: Perl regex to strip C comments. The first result provided the answer. Try this yourself - the practice will do you good.

-- Ken

Replies are listed 'Best First'.
Re^2: Regex to strip comments
by zuma53 (Beadle) on Oct 01, 2012 at 02:20 UTC

    Thanks for the suggestion.

    The code is SQL and I am not a C programmer, so I was unaware they are similar.

      Removing C from the search, i.e. Perl regex to strip comments, I still get the same answer as the first result.

      Even removing Perl from the search and using your node title verbatim, i.e. Regex to strip comments, the third result gives the same answer.

      -- Ken