我试过了,但没用
return re.sub('([^)]*)','', myResultStats.text)
建议?
thanks
尝试这个:
return re.sub('\(.*?\)','', myResultStats.text)
括号表示捕获组,因此您必须转义它们。