Workaround to a regex glitch on python 2.6.6