0 votes

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 or huú or ulu or ulú (all whole words).

Find or huú: 265 hits.

Find ulu or ulú: 76 hits.

Total: 341 hits.

Find 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

Paratext by (456 points)
reshown

1 Answer

0 votes

Sorry, I just found out that the vertical bar | is used for alternation.

(Still, not quite sure why “regex:(hū|huú|ulu|ulú)” only gives 300 results.)

Paulus+Kieviet

by (456 points)
reshown

Paulus+Kieviet - do you have the context set to “Whole word only”? Were you using that before? That is one thing that can affect the counts. In my test I do see that each individual word in the search is found - regardless of how many occur in a verse.

Related questions

Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Just as a body, though one, has many parts, but all its many parts form one body, so it is with Christ.
1 Corinthians 12:12
2,565 questions
5,297 answers
5,002 comments
1,375 users