In the general case, you can't.
Here's a tricky answer that happens to work in this case:
/**
* perl -pe 's/(?<=.{6}).* //gx' : Limit to PID
*/
This is (or should be, I didn't actually test the perl command) a regex that matches the same as the original because the x modifier allows whitespace to be used for clarity in the expression, which allows the *
to be separated from the /
.
You could use more whitespace, I've included just the single space that breaks the end of comment block token.
Some compilers support an option to turn on the non-standard feature of allowing nested comments. This is usually a bad idea, but in this particular case you could also do
/**
* /* perl -pe 's/(?<=.{6}).*//g' : Limit to PID
*/
with that option turned on for just this source file. Of course as demonstrated by the funky coloring in the above fragment, the rest of your tools may not know what you are up to and will make incorrect guesses.