I am trying to remove block comments of the /* comment */ kind.
I've gulped the file into one string and have removed the block comments by using:
$TEXT =~ s/\/\*(.*?)\*\///g
This works most of the time, until, you guessed it, there's an embedded text string with a innocuous '/*' or '*/' somewhere which gums up the regex.
This has probably been asked and answered a thousand times over already, but I have not found a working solution.
Thanks.
In reply to Regex to strip comments by zuma53
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |