0
237 次浏览

在 PT 中,有没有办法使用正则表达式来查找“A 或 B 或 C 或 D”?如果 A、B、C 和 D 是单个字符,我们可以将它们放在方括号中,但如果 A、B、C 和 D 是较长的字符串该怎么办?PT 有“多个单词”功能,但这只能组合两个单词“A 或 B”。

一种选择是:先查找两个单词,然后查找另外两个单词并“添加到列表”。然而,这给出的命中次数少于总出现次数:如果不同的单词出现在同一节中,它不会给出额外的命中。

具体案例:我想查找 huúuluulú(均为完整单词)的所有出现。

查找 huú:265 次命中。

查找 uluulú:76 次命中。

总计:341 次命中。

查找 huú,然后查找 uluulú 并“添加到列表”:330 次命中。这意味着在浏览此列表时,如果一个 ulu/ulú 和一个 hū/huú 出现在同一节中,可能会遗漏某些出现。

因此我的问题是:可以使用正则表达式(RegEx)进行此搜索吗?

Paulus+Kieviet

机器翻译自 English
Paratext (517 分) 发布
已重新显示 | 237 次浏览

1 个回答

0

抱歉,我刚刚发现竖线 | 用于表示“或”。

(不过,我仍然不太明白为什么“regex:(hū|huú|ulu|ulú)”只给出 300 个结果。)

Paulus+Kieviet

机器翻译自 English
(517 分) 发布
已重新显示

Paulus+Kieviet - 您的上下文设置是否为“仅完整单词”?您之前使用过该设置吗?这是可能影响计数的一项设置。在我的测试中,我发现搜索中的每个单独单词都能被找到——无论一节中出现多少个。

机器翻译自 English

相关问题

+1
5 个回答 1.0k 次浏览
我想在某些情况下将小写更改为大写--例如,我想将冒号后的所有小写字母更改为大写 在 RegEx Pal 中,没有单一的规则可以实现这一点,但有一个未记录的功能允许我创建一个简单更改的列表来运行 (注意:有一些正则表达式可以做到这一点,但在 ... A 可能还有其他一些事情不能按预期工作 如果您想尝试此方法,我建议从一个非常简单的列表开始,然后逐步添加内容
Phil_Leckrone 9.9k 发布 提问于 三月 2, 2022
0
5 个回答 653 次浏览
In our project's Biblical Terms list, I'm looking for an (easier) way to filter for terms which contain too many ... \r\n and filter more specifically that way? Any suggestions?
Mark P 3.2k 发布 提问于 七月 4, 2017
0
3 个回答 1.1k 次浏览
[There is no Help topic for RegEx Pal, so I'll start this thread for myself or anyone else to add helpful ... History panic (post #3) Key terms for search: regular expression
wdavidhj 1.4k 发布 提问于 六月 5, 2019
0
5 个回答 773 次浏览
It appears that for all projects that I have created in PT8 RegEx Pal displays text in the find and replace windows using ... What do I need to do to stop this from happening?
Kent Spielmann 1.8k 发布 提问于 二月 26, 2018
0
8 个回答 1.6k 次浏览
We have a user who has inserted a lot of \pn and some \nd inside of footnotes. We now know we need those to be ... the search to inside of a single footnote? Thank you, MSEAIT/LT
MSEAIT_LT 478 发布 提问于 八月 20, 2018
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Accept the one whose faith is weak, without quarreling over disputable matters.
Romans 14:1
3,049 个问题
6,007 个回答
5,672 条评论
2,029 位用户