parser question

Daniel Schüle uval at rz.uni-karlsruhe.de
Wed Oct 19 10:38:49 EDT 2005


> pattern = re.compile(r"^\s*A\s*{.*}\s*", re.MULTILINE | re.DOTALL)

correction

pattern = re.compile(r"^\s*A\s*{.*?}\s*", re.MULTILINE | re.DOTALL)

I forgot to make it non gready :)





More information about the Python-list mailing list