added re.sub() support
added re.flags support