[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Corrected patch to convert-ly
From: |
Han-Wen Nienhuys |
Subject: |
Corrected patch to convert-ly |
Date: |
Sun, 4 Aug 2002 23:08:22 +0200 |
address@hidden writes:
> This one works:
Yes, but I think your code is too verbose. Can you experiment a little
with regexp substitutions? i.e. something like
def func(m):
prop = m.group(2)
# your substitution here
return m.group(1) + prop + m.group (3)
str = re.sub ('(breakAlignOrder *= )*\([^)]+\)(.*)', func, str)
--
Han-Wen Nienhuys | address@hidden | http://www.cs.uu.nl/~hanwen