regex

Python Regex Match

August 9, 2017 ∙ Use re.search

Python Regex Partial Replace

August 9, 2017 ∙ Use capture group and reference: re.sub(r”(match)(replace)", r”\1new”, string)