String literals aren't parsed inside of comments, as your code seems to assume. It is only the string literals outside of comments where '/*' needs to be ignored. (And, despite the OP's claim, '*/' in a string literal isn't a problem.)
[Update: After posting, I see that your node, despite being earlier, is listed below my other node. So it must have a negative rep. FYI, I didn't down-vote it. I guess I figured posting the correction might well be punishment enough. :) ]
- tye
In reply to Re^2: Regex to strip comments (out not in)
by tye
in thread Regex to strip comments
by zuma53
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |