You could try this:
$t = 'fred /* bill "jack \" */ \xAB \t john\n" mick */ mary /* /* \u12 +ef */ jane';; ( $s = $t ) =~ s[(/\*(?:"(?:\\\\|\\[abfnrt]|\\u[0-9a-fA-F]{4}|\\x[0-9a +-fA-F]{2,4}|\\"|[^"])+?"|.)*?\*/)][]msg; print $s;; fred mary jane
There are probably some edge cases I've missed, but they should be fixable.
In reply to Re: Regex to strip comments
by BrowserUk
in thread Regex to strip comments
by zuma53
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |