Sub 替换删除选择题括号中的选项() '2021-2-22 'dg nextseven Dim doc As Document, p As Paragraph Set doc = ThisDocument Set regex = CreateObject("VBScript.RegExp") With regex .Global = True .Pattern = "(?:[[({()])([dD]*?)(?:[])})])" End With For n = 1 To doc.Paragraphs.Count Set p = doc.Paragraphs(n) Set mh = regex.Execute(p.Range.Text) If mh.Count > 0 Then p.Range.Text = Replace(p.Range.Text, mh(0).submatches(0), Space(Len(mh(0).submatches(0)))) End If Next n Set doc = Nothing Set p = Nothing Set regex = Nothing End Sub