Workaround for restrictions with 2.6 re module