Originally Posted by Airblader
Originally Posted by Old Pedant
Why not just use a regular expression to zap all // comments as well as any /*...*/ contained on a single line?
Ummm...I was asking myself that question. I hadn't seen your post yet. So definitely rhetorical.
I really *MUCH* prefer the way you wrote that, putting one .replace
per code line. Neat and clean and readable. Kudos.