我创建了一个MS Word宏来搜索某些文本(由标记代码表示),剪切文本并将其插入到新的脚注中,然后从脚注中删除标记代码.现在我希望宏重复,直到它在文本中找不到任何更多的标记代码.
这是下面的宏
Sub SearchFN()
'find a footnote
Selection.Find.ClearFormatting
With Selection.Find
.Text = "&&FB:*&&FE"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchByte = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchFuzzy = False
.MatchWildcards = True
End With
Selection.Find.Execute
'cut the footnote from the text
Selection.Cut
'create a proper Word footnote
With Selection
With .FootnoteOptions
.Location = …
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用BeautifulSoup来解析XML文件.其中一个元素中有一个连字符:分布代码
我该如何访问它?我试过了:
soup.distribution-code
soup."distribution-code" (tried single quotes too)
soup.[distribution-code]
Run Code Online (Sandbox Code Playgroud)
但这些都不起作用.