我試圖搜尋所有以特定詞頭開頭、以無重音元音結尾的章節標題。
例如,它應該能找到:
\s Ko te ongo tangata langa fale
但不應該找到:
\s Ko te ongo tangata langa falé
我使用了以下正則表達式:
regex:\s Ko te .?[aeiou]\s \
然而,這不起作用:Paratext 確實找到了所有以 “Ko te” 開頭的章節標題,但也找到了那些未以普通元音結尾的標題。對於後者,搜尋結果包含了從該標題開始直到下一個以普通元音結尾的章節標題為止的所有文字。例如,其中一個搜尋結果是:
\s Ko te fu’u 'akau mo tono fuá \r …. [大量文字] …. \s Ko te fakatokanga
我原本預期使用 *?(非貪婪模式)可以解決這個問題,但顯然並不能。
我也嘗試了類似以下的變體:
regex:\s Ko te .?[aeiou]\ (只有錯誤的命中)
regex:\s Ko te . ?[aeiou]\s*\r\n (沒有命中)
有沒有其他有效的方法?
提前感謝!
Paulus+Kieviet
I’m trying to do a search for all section headings that start with certain particles and end with a vowel without accent.
E.g. it should find:
\s Ko te ongo tangata langa fale
but not:
\s Ko te ongo tangata langa falé
I used the following Regex:
regex:\s Ko te .?[aeiou]\s \
However, this does not work: Paratext does find all section headings that start with “Ko te”, but also finds those that don’t end with a plain vowel. For the latter, the search result includes all text down to the next section heading that does end with a plain vowel. For example, one search result is:
\s Ko te fu’u 'akau mo tono fuá \r …. [lots and lots of text] …. \s Ko te fakatokanga
I would have expected that the use of *? (not greedy) would take care of this, but apparently it doesn’t.
I also tried variants like
regex:\s Ko te .?[aeiou]\ (only faulty hits)
regex:\s Ko te . ?[aeiou]\s*\r\n (no hits)
Is there another way which does work?
Thanks in advance!
Paulus+Kieviet
機器翻譯自 English 顯示原文