Python Re Replace All Javascript Methods Syntax