"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
In reply to Re: Regex to strip comments
by kcott
in thread Regex to strip comments
by zuma53
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |