pymatcher: use re.escape to preprocess