How to do a regex replace with matching case?,"re.sub('\\bfoo\\b', cased_replacer('bar'), 'this is foo', flags=re.I)"