|
|
| more useful options | |
| PerlMonks |
Re^2: how do I print content of a cpp file without cpp comments?by davorg (Chancellor) |
| on Sep 19, 2006 at 09:57 UTC ( [id://573725]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
It's been a while since I've written much C or C++, but doesn't your code have a slight problem when the comment character sequences appear in quoted strings? Which (along with jarich's bug) just goes to illustrate the problems of trying to parse complex data using regular expressions. You'll almost certainly fall over subtle edge cases unless you use a real parser.
-- <http://dave.org.uk> "The first rule of Perl club is you do not talk about
Perl club."
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||