F: How can I make re.sub() replace patterns across newlines
Viktor Rosenfeld
rosenfel at informatik.hu-berlin.de
Sun Feb 1 19:42:05 EST 2004
More information about the Python-list mailing list
Sun Feb 1 19:42:05 EST 2004
- Previous message (by thread): F: How can I make re.sub() replace patterns across newlines
- Next message (by thread): F: How can I make re.sub() replace patterns across newlines
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I want to strip a JAVA file of /* */ like comments. Unfortunately, the simple regexp "\/\*.*\*\/" only works on comments, that are on one line. Is there a simple way to remove comments that go across several lines with python regexp's? I tried re.M to no avail. Thanks, Viktor
- Previous message (by thread): F: How can I make re.sub() replace patterns across newlines
- Next message (by thread): F: How can I make re.sub() replace patterns across newlines
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list