在 PT 中,有辦法使用正則表達式來搜尋「A 或 B 或 C 或 D」嗎?如果 A、B、C 和 D 是單個字元,我們可以將它們放在方括號中,但如果 A、B、C 和 D 是較長的字串呢?PT 有「多個詞語」功能,但這只能組合兩個詞語「A 或 B」。
一個選項是:先搜尋兩個詞語,然後搜尋另外兩個詞語並「加入清單」。然而,這樣得到的命中次數會少於總出現次數:如果不同的詞語出現在同一節經文中,不會額外計入命中次數。
具體情況如下:我想搜尋 hū 或 huú 或 ulu 或 ulú (均為完整單詞)的所有出現位置。
搜尋 hū 或 huú :265 次命中。
搜尋 ulu 或 ulú :76 次命中。
總計:341 次命中。
先搜尋 hū 或 huú ,然後搜尋 ulu 或 ulú 並「加入清單」:330 次命中。這意味著在瀏覽此清單時,如果 ulu/ulú 中的某個詞和 hū/huú 中的某個詞出現在同一節經文中,可能會遺漏這些出現位置。
因此我的問題是:可以使用正則表達式進行此搜尋嗎?
Paulus+Kieviet
Is there a way to find “A or B or C or D” in PT using regex? If A, B, C and D are single characters we can put them between square brackets, but what if A, B, C and D are longer strings? PT has the function “multiple words” but this only has the option to combine two words “A or B”.
One option is: first find two words, then find the other two and “Add to list”. However, this will give less hits than the total number of occurrences: it does not give an additional hit if the different words occur in the same verse.
The case in point: I want to find all occurrences of hū or huú or ulu or ulú (all whole words).
Find hū or huú : 265 hits.
Find ulu or ulú : 76 hits.
Total: 341 hits.
Find hū or huú , then ulu or ulú “add to list”: 330 hits. This means that when browsing through this list, one may overlook occurrences when one of ulu/ulú and one of hū/huú occur in the same verse.
Hence my question: can this search be done with RegEx?
Paulus+Kieviet
機器翻譯自 English 顯示原文