我發現自己需要執行此操作,並建立了一個正則表達式(Regular Expression),允許我逐卷將所有 Status 欄位從「todo」更改為「deleted」。我注意到 XML 檔案中欄位的格式/順序始終保持一致:

image1284×121 7.28 KB
因此,我能夠建立一個表達式,它可以在特定書卷中找到 VerseRef,忽略該行的其餘部分,然後跳過任何以空格開頭且緊跟 <S 或 <C 的行,接著尋找以空格開頭且緊跟 <Status>todo 的行。它會將該「todo」更改為「deleted」。以下是該表達式:
Find: (VerseRef="\dJN .+\r\n(\s+<[SC].+\r\n)*?\s+<Status>)todo
Replace: \1deleted
因此,在可以使用正則表達式的文字編輯器中(如果您沒有首選的編輯器,可以使用 Notepad++),使用這些尋找和取代字串來找到 1JN、2JN 和 3JN 中所有未解決的註釋,並將它們更改為已解決。
尋找表達式中的 \dJN 使用進一步的正則表達式來尋找所有以數字開頭且緊跟 JN 的書卷中的註釋。您可以將該字串替換為其他書卷代碼,以尋找該書卷中的註釋,例如 MAT、ISA,或像 \dCO 這樣代表 1CO 和 2CO 的表達式。
希望這對某位朋友有幫助(如果我再需要做一次,也可能對我有幫助…
)
I found myself needing to do this, and created a Regular Expression that allows me to change all of the Status fields from “todo” to “deleted” on a book by book basis. I noticed that the format/order of the fields in the XML file was always consistent:

image1284×121 7.28 KB
So I was able to create an expression that finds a VerseRef in a particular book, ignores the rest of that line, then skips over any number of lines that begin with spaces and then a <S or <C, then looks for a line that starts with spaces and then <Status>todo. It will change that “todo” to “deleted”. Here is the expression:
Find: (VerseRef="\dJN .+\r\n(\s+<[SC].+\r\n)*?\s+<Status>)todo
Replace: \1deleted
So in a text editor that can work with Regular Expressions (Notepad++ if you don’t have a favorite), use those find and replace strings to find all of the notes that are not resolved in 1JN, 2JN, 3JN, and change them to resolved.
The \dJN in the find expression uses a further RegEx to find notes in all books that start with a digit and then JN. You can replace that string with another book code to find the notes in that book, e.g. MAT, ISA, or things like \dCO for 1CO and 2CO.
Hope that helps someone out there (and might help me if I have to do it again…
)
機器翻譯自 English