0
648 次瀏覽

In our project’s Biblical Terms list, I’m looking for an (easier) way to filter for terms which contain “too many” different renderings.


So in the above example, I would love to be able to just enter a RegEx code which looks for a pattern - say for example 3 or more stars * in the rendering field (which in this case would filter the middle three rows - as they all have 3 or more renderings).

I tried using a RegEx in the find window by doing something like this:

However, because the renderings themselves are stored on different lines with a or \r\n between each rendering, I can’t seem to get any RegEx to correctly locate what I’m looking for.

So for example, regex:\.+?\.+?\* doesn’t find anything.
And neither does this:regex:\.+?\r\n.+?\.+?\r\n.+?\.+?\r\n.+?\

I think I need to turn on the DOTALL /s flag (or something similar), but nothing that I’ve tried works yet. Alternatively, could I search for the number of occurrences of \r\n and filter more specifically that way?

Any suggestions?

舊文章 - 以原文顯示
Paratext (3.2k 點) 提出 | 648 次瀏覽

5 個回答

0
最佳回答

Hi anon467281,

Thanks for your response. Yes, I realize that something like that should work, but it clearly isn’t for me (within the Biblical Terms Find tool).

I’m assuming the some of the * s in your RegEx need to be escaped, but even so, there seems to be no effect of using (?s). So Paratext must be doing something else to the RegEx (or the data) to prevent this from working right.

I can copy and paste data from the renderings area into Notepad++ and see that there is \r\n at the end of each “line” and then the RegEx works to find what I’m looking for there.

The closest I ever got to finding 2 or more * in the data (within the Biblical Terms tool) was with this one (shown below), but it only finds one occurrence (as that entry has 2 stars on the same line: bavisatna gost** is all on the same line, whereas the others are on different lines).


But the fact that it returns something from the “second line of data” shows that it is at least seeing beyond the first line of data (mune jargval*) - which is encouraging.

Can someone look into a similar project (or use my SGAlatin) project to see if they can figure out what is/isn’t happening?
Thanks,
Mark

舊文章 - 以原文顯示
(3.2k 點) 提出

Paratext compares the find text to the text of each rendering (i.e. each line), not to the whole rendering textbox. Unfortunately, this means there is no way to do what you want, sorry. :neutral_face:

舊文章 - 以原文顯示
0

Try the following and see if it works:

(?s)*.?*(.?*)+

This should find when 3 or more ** are found.

The (?s) says that the . matches line breaks (\n). By default it only
matches up thru the \r and stops at the \n.

D anon467281

Global Publishing Services
Scripture Typesetting trainer & Regular Expression "specialist"
Dallas, TX

舊文章 - 以原文顯示
(571 點) 提出
已重新顯示
0

Thanks for confirming my fear/suspicion. So should I submit this as a ‘bug to be fixed’ or a ‘feature request’? Or will it make no real difference in this case? My only work-around right now is to export the entire list to HTML>Excel and then add a column which counts the renderings (and can be sorted or filtered on). Not ideal (as it is a static/stale list) but at least I can find what I’m looking for. Roll on PT9… :wink:

舊文章 - 以原文顯示
(3.2k 點) 提出
0

You certainly could submit a feature request, but since it’s not the way the tool was designed to work and it seems like an unusual use-case, it would probably be considered low-priority.

舊文章 - 以原文顯示
[Expert]
(16.7k 點) 提出

Just curious what makes this an
"unusual use-case"? Multiple renderings for one key term?
Because we’re definitely going to need a way to sift the list
for multiple renderings (ten-ish translators, five
denominations, four dialects–you can see the issue[s])…

    Paul
舊文章 - 以原文顯示
0

I was meaning that it’s an unusual use-case to have the text-search match through multiple renderings.

舊文章 - 以原文顯示
[Expert]
(16.7k 點) 提出

已重新顯示

相關問題

0
6 個回答 792 次瀏覽
Hi, The previous version of Regex Pal (in Paratext 7.5 and 7.6) used Word Wrap/Line wrap, which was really helpful ... Is there any way to have RegEx Pal wrap lines? Thanks, BEH
BEH 418 提出 已提問 7月 31, 2017
0
1 個回答 224 次瀏覽
Paratext 說明指出:「在工具列的搜尋框中,您可以輸入要搜尋的文字或要比對的正則表示式。」 我需要能夠找出所有不包含「gloss」一詞的專案註釋。我應該使用什麼正則表示式,才能在註釋清單的文字篩選視窗中達成此目的?感謝您提供的任何協助。
john_nystrom 312 提出 已提問 6月 15, 2021
0
3 個回答 972 次瀏覽
[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 提出 已提問 6月 5, 2019
+1
5 個回答 903 次瀏覽
我希望在特定情況下將小寫字母改為大寫--例如,我希望將冒號後的所有小寫字母改為大寫 在 RegEx Pal 中,我找不到單一的規則來實現這一點,但有一個未記錄在案的功能,允許我建立一個簡單變更的列表來執行 (注意:確實有正則表達式可以做到 ... 可能還有其他一些事情不會完全按預期工作 如果您想嘗試此方法,我建議從一個非常簡單的列表開始,然後逐步添加內容
Phil_Leckrone 9.9k 提出 已提問 3月 2, 2022
0
1 個回答 213 次瀏覽
一位使用者指出,在編輯譯文時,如果開啟回譯視窗,回譯似乎會在 \v 1 之前添加新行 該使用者製作了一段影片展示這個問題,我也在我的環境中成功重現了 由於該使用者當時正在處理約拿書,我在我的範例專案中添加 ... 新行 這是 Notepad++ 的畫面: 這是 PTx 9.1.104 中文字的樣子: image895 351 7.02 KB 有什麼想法嗎?
MSEAIT_LT 478 提出 已提問 6月 8, 2021
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Every day they continued to meet together in the temple courts. They broke bread in their homes and ate together with glad and sincere hearts, praising God and enjoying the favor of all the people. And the Lord added to their number daily those who were being saved.
Acts 2:46-47
3,046 個問題
6,006 個回答
5,671 則評論
2,027 位使用者