parser question

Daniel Schüle uval at rz.uni-karlsruhe.de
Wed Oct 19 16:38:49 CEST 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