使用格式化字符串的方式实现举例: re.findall("(this,%s,'(.*?)'"%str(i),"abcd(this,1,'123123)')这里i为变量 转载于:https://www.cnblogs.com/VseYoung/p/9095032.html