... I suspect that someone has already come up with a parser spec to handle C-like comments.
FWIW, Parse::RecDescent comes with a little demo script (demo_decomment_nonlocal.pl), which does about that. It doesn't handle nested comments though (just like C/C++), but it could certainly be extended to handle that, too...
In reply to Re^2: need regex help to strip things like embedded C comments
by almut
in thread need regex help to strip things like embedded C comments
by Eradicatore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |