+1 मत
176 व्यूज़

The following Regex will allow you to compare two projects with the divine name markup \nd …\nd* in Paratext Find and using Remove From List, to see where the number of instances in a verse differ. Settings need to be without any restrictions. It will not work if Match Only in Verse Text is checked.

regex:(?<=\\v\s\S+\s)((?!\\(v|m?s|nd)).)*(\\nd [^\\]*?\\nd\*)){1,1}((?!\\(v|m?s|nd|c)).)*(?=\\(v|s|c)|\Z)

This regex allows you to find verses with a specified number of \nd spans in the text:

  • {1,1} one and only one
  • {1} exactly one (same as above)
  • {2,} two or more
  • {0,0} None

It does not find \nd markup in section headings nor will it find \+nd markup

Issues

  • Since it will not find \+nd markup it will not find \+nd in regular text (rare).
  • It will not find \nd in a partial verse that follows a section heading (rare).

The following Regex will find txt in \+nd …\+nd* spans in regular text and footnotes: .

regex:(?<=\\v\s\S+\s)(((?!\\(v|m?s|\+nd)).)*(\\\+?nd [^\\]*?\\\+?nd\*)){1,1}((?!\\(v|m?s|\+nd)).)*(?=\\(v|m?s)|\Z)

Issues

  • Since it will find \+nd markup it will find \+nd in footnotes (common).

If we want to use this to compare an English translation that uses \nd markup with a translation that uses a unique unmarked word for YHWH, we can add the word to the find. For French we will look for Eternel

regex:(?<=\\v\s\S+\s)(((?!\\(v|m?s|nd)|Eternel).)*(\\\+?nd [^\\]*?\\\+?nd\*|Eternel)){1,1}((?!\\(v|m?s|nd)|Eternel).)*(?=\\v|m?s)|\Z)

Since Eternel also occurs in footnotes we want to skip finding the text in footnotes. The following Schema will allow you skip text (such as a footnote span) when matching:

schema:(?<=<start>)(((?!<selector>).)*((<skipSpan>((?!<selector>).)*)*<requiredSpan>)){Min,Max}((?!<selector>).)*(<skipSpan>((?!<selector>).)*)*(?=<end>|\Z)

For the <selector> see: Regex Examples: Matching Whole Lines of Text That Satisfy Certain Requirements

If your condition is that a line should not contain something, use negative lookahead. ^((?!regexp).)*$ matches a complete line that does not match regexp.

Let’s apply this to skipping text in footnotes. We are required to match \nd and \+nd spans and Eternel:

<start>         \\v\s\S+\s                         ; Start at verse
<end>           \\(v|m?s)                          ; End at verse or section heading 
<end>|\Z        \\(v|m?s)|\Z                       ; For final context add \Z to select end of Chapter
<requiredStart> \\\+?nd|Eternel                    ; \nd markup optionally embedded and "Eternel"
<requiredSpan>  (\\\+?nd [^\\]*?\\\+?nd\*|Eternel) ; The entire \nd phrase or "Eternel"
<skipStart>     \\f\s                              ; Beginning of a footnote
<skipSpan>      (\\f\s((?!\\f\*).)*\\f\*)          ; The entire footnote
<selector>      <end>|<skipStart>|<requiredStart>  ; Combine all of the selection restrictions 
    =>          \\(v|m?s)|\\f\s|\\\+?ndEternel     ; which simplifies to 
    =>          \\(v|m?s|f\s|\+?nd)|Eternel

Complete regex:
regex:(?<=\\v\s\S+\s)(((?!\\(v|m?s|f\s|\+?nd)|Eternel).)*(((\\f\s((?!\\f\*).)*\\f\*)((?!\\(v|m?s|f\s|\+?nd)|Eternel).)*)*(\\\+?nd[^\\]*?\\\+?nd\*|Eternel))){1,1}((?!\\(v|m?s|f\s|\+?nd)|Eternel).)*((\\f\s([^\\]|\\(?!f\*))*\\f\*)((?!\\(v|m?s|f\s|\+?nd)|Eternel).)*)*(?=(\\(v|m?s))|\Z)

Paratext में द्वारा (1.8k अंक)
फिर से दिखाया गया | 176 व्यूज़

इस प्रश्न के उत्तर देने के लिए कृपया लॉग इन करें या पंजीकरण करें।

संबंधित प्रश्न

0 वोट
1 उत्तर 475 व्यूज़
A couple of days ago user 1 reported to me that in one PT8 project, the text direction somehow changed to ... are managed by two different organizations. How could this happen?
anon895417 129 पूछा गया दिसंबर 4, 2017
0 वोट
8 उत्तर 2.3k व्यूज़
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
Paratext में
0 वोट
0 उत्तर 175 व्यूज़
To compare the versions of a project in which there were changes: Click in the window of the project to make it the ... how-do-i-compare-a-word-or-phrase-in-different-projects/19)
[Expert]
anon421222
735
पूछा गया फ़रवरी 23, 2017
0 वोट
2 उत्तर 373 व्यूज़
शीर्षकों में \pn और \nd मार्कर का उपयोग करने से वह टेक्स्ट बनता है जिसमें बाकी टेक्स्ट के सभी अन्य कैरेक्टर ... में। शीर्षकों में ऐसे मार्कर का उपयोग कैसे किया जाना चाहिए?
anon015155 153 पूछा गया सितंबर 26, 2018
0 वोट
2 उत्तर 737 व्यूज़
मुझे जानना है कि प्रत्येक पुस्तक का कितना प्रतिशत ड्राफ्ट किया गया है। प्रत्येक पुस्तक में कितने श्लोकों में पाठ है, इसकी ... आपकी दी गई किसी भी मदद के लिए धन्यवाद। जॉन नीस्ट्रॉम
john_nystrom 312 पूछा गया अगस्त 21, 2024
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
I appeal to you, brothers and sisters, in the name of our Lord Jesus Christ, that all of you agree with one another in what you say and that there be no divisions among you, but that you be perfectly united in mind and thought.
1 Corinthians 1:10
3,054 प्रश्न
6,014 उत्तर
5,677 टिप्पणियाँ
2,033 उपयोगकर्ता