Regular expression that skips single line comments?

martinjamesevans at martinjamesevans at
Tue Jan 20 08:51:04 CET 2009

Firstly, a huge thanks to all for the solutions!  Just what I was
looking for.

> (Aside: why are you doing a case-insensitive match for a non-letter? Are
> there different upper- and lower-case dollar signs?)

As you can probably imagine, I had simplified the problem slightly,
the language uses a couple of different introducers and also uses both
numbers and letters (but only single characters).

I was going to go with a similar idea of parsing per line but was
trying to give RE another chance. I've used RE often in the past but
for some reason this one had got under my skin.

I found this to be quite an interesting little tool:


More information about the Python-list mailing list