Я пытаюсь выполнить поиск всех заголовков разделов, которые начинаются с определенных частиц и заканчиваются гласной без ударения.
Например, он должен находить:
\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