Comment

Peter Bengtsson

Thanks! Well spotted!

Parent comment

Alex

Your comment-removing regex is a bit too greedy: it will eat anything between two comments: In [10]: re.sub('', '', 'lu', re.M) Out[10]: '' fix: use the non-greedy version of *: In [11]: re.sub('', '', 'lu', re.M) Out[11]: 'lu'