Improving/Fixing a Regex for C style block comments
Some problems I see with your regex: There’s no need for the |[\r\n] sequences in your regex; a negated character class like [^*] matches everything except *, including line separators. It’s only the . (dot) metacharacter that doesn’t match those. Once you’re inside the comment, the only character you have to look for is an … Read more