0 वोट
246 व्यूज़
25 साल पहले मैंने CC टेबल सीखे थे और उनमें काफी अच्छा हो गया था। अब मैं समय के साथ कदम मिला रहा हूँ और नियमित अभिव्यक्तियाँ (regular expressions) सीखने की कोशिश कर रहा हूँ, क्योंकि मुझे किसी तरह यह प्रभाव हुआ कि PTXPrint में changes.txt उनका उपयोग करता है। हालाँकि, वे नियमित अभिव्यक्तियाँ जो मैं (अंततः) उनमें से एक ट्यूटोरियल वेबसाइट पर उन्हें वही करने के लिए प्राप्त कर रहा हूँ जो मैं चाहता हूँ, जब मैं उन्हें changes.txt में डालता हूँ तो काम नहीं करतीं। एक सरल एक-से-एक परिवर्तन कोई समस्या नहीं है, लेकिन जब मैं (उदाहरण के लिए) > के एक पक्ष पर कोष्ठक (parentheses) का उपयोग करने की कोशिश करता हूँ और दूसरे पक्ष पर एक बैक-रेफरेंस \1, तो यह काम नहीं करता। मेरा अनुमान है कि मैं PTXPrint में कार्यान्वयन की विशिष्ट संरचना (syntax) के बारे में विवरण छूट रहा हूँ। क्या changes.txt की संरचना के बारे में कोई दस्तावेज़ीकरण है? या यह RegEx का कौन सा उपसमूह (subset) समर्थित करता है?

PS - Reg Ex Pal में भी अपने अभिव्यक्ति को काम करने में सफल रहा, PTX में भी।
English से मशीन-अनुवादित
PTXprint में द्वारा (206 अंक)
संपादित द्वारा | 246 व्यूज़

2 उत्तर

0 वोट
मैंने अपना अपना समस्या हल कर ली। लगता है कि परिवर्तन के दोनों पक्षों को पूरी नियमित अभिव्यक्ति के चारों ओर डबल कोटेशन मार्क्स (double quotation marks) होने चाहिए, न कि केवल लिटरल्स (literals) के चारों ओर। मैं अभी भी यह जानना चाहता हूँ कि क्या इस बारे में कहीं और दस्तावेज़ीकरण है। उदाहरण के लिए, मुझे "at GAL 1:5 ...." के बारे में पता है, लेकिन लगता है कि कहीं मैंने कुछ देखा (शायद वीडियो में से एक में) जिसमें "at" के बजाय एक अलग पूर्वसर्ग (preposition) का उपयोग किया गया था। मुझे जानना अच्छा लगेगा कि वे क्या हो सकते हैं, लेकिन वीडियो या पावरपॉइंट स्लाइड्स में इसे फिर से खोजने की उम्मीद हार चुका हूँ। मुझे यह भी जानना है कि प्रस्तावना सामग्री में व्यक्तिगत अनुच्छेदों को पता करने के लिए संरचना (syntax) क्या है। मैं Adjust lists में ऐसा कर सकता हूँ (जैसे GAL 0.1  -1[13]) लेकिन यह संरचना changes.txt में काम नहीं करने लगती है। फिर भी, हर छोटी-छोटी बात के लिए आप सबको परेशान करना पसंद नहीं है, इसलिए मुझे जानना अच्छा लगेगा कि यह सब कहाँ लिखा हुआ है।
English से मशीन-अनुवादित
द्वारा (206 अंक)
संपादित द्वारा
0 वोट

Yes, indeed, we do support Regex (and specifically the python flavour). You are correct that backslash codes such as \p must be escaped with a \ so that they appear as \\p.

Here are some examples of the kinds of things that you can do:

# Make space before last word in a section heading a Non-breaking space.
"(\\s( \S+)+) (\S+\s*\r?\n)"  > "\1\u00A0\3"

# If you only want the 3-letter book code to appear in the alternate header \h1 field (to help with typesetting)
"(\\id (...).+\n)" > "\1\\h1 \2\r\n"

# Change any normal \p at the start of chapters which really look like they should be no-break paragraph \nb
# at 2CO  2:0; 2CO  7:0; COL  2:0; COL  4:0; HEB 10:0  "\\p" > "\\nb"

# Shrink the paragraph starting at EXO 29:2 by 2%
at EXO 29:1 "\\p" > "\\p^98"

# Remove the \b after a \d within the book of PSA
at PSA "(\\d .+?[\r\n])\\b[\s\r\n]" > "\1"

# Remove \b after a \s section heading
"(\\s .+?[\r\n])\\b[\s\r\n]" > "\1"

# Just for certain books, insert a page break BEFORE the title of the Introductory Outline
at MAT; ROM; 1CO; PHP; COL "(\\iot )" > "\\pb\r\n\1" 

# Only for *some* books, it looks better if chapter 1 starts on its own page
at MRK; JHN; 1TI; JAS "(\\c 1 ?\r?\n)" > "\\pb\n\1"

# Wrap \io lines that are too long:
at MRK in "\\io\d [^\\]+\\ior": "ఆని పణిఙని" > "ఆని\u2028పణిఙని"
at LUK in "\\io\d [^\\]+\\ior": "బోదిసి, జబ్బుది" > "బోదిసి,\u2028జబ్బుది"

# Insert an em-dash surrounded by a couple of spaces before the ch:vs range of \io1 and \io2
# Note that this uses the IN notation, which restricts the change to only happen WITHIN the context specified.
# This is a very useful trick to make complex rules much simpler by specifying where they can apply first.
in "\\io\d .+[\r\n]": "\s([0-9]+:[0-9:\-]+)" > "~~\u2014~~\1"

# Use Small-caps instead of ALLCAPS
"CHAKRAMANG" > "\\sc Chakramang\\sc*"
at EXO 3:14 "IAWNGUOWI" > "\\sc Iawnguowi\\sc*"
at EXO 28:36, 29:6 "CHAKRAMANG VÜI CHIMSAIMA" > "\\sc Chakramang Vüi Chimsaima\\sc*"

# Shrink these paragraphs* by 3% 
# (*actually it is the \p which appears before the NEXT verse which gets shrunk)
at LEV 7:10; 13:44; 14:0; 16:19,22; 20:13,18; 24:0; 26:26; 27:8 '\\p(\s)' > '\\p^97\1'

Most of the above is documented in the slides within this massive slide stack.

द्वारा (3.2k अंक)
"स्लाइड स्टैक" की ओर इशारा करने के लिए धन्यवाद। मैं इस पर कुछ समय बिताऊंगा ताकि देख सकूं कि मैं उनसे और क्या सीख सकता हूँ। ये उदाहरण भी मेरे RegEx क्षितिज को विस्तारित करने में सहायक हैं। अभी भी CC टेबल के लिए नॉस्टाल्जिया महसूस कर रहा हूँ, लेकिन मैं इससे उबर जाऊंगा।
English से मशीन-अनुवादित
प्रस्तावना के अनुच्छेदों का संदर्भ

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

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
Paratext में
0 वोट
10 उत्तर 2.2k व्यूज़
Is there are way to get the expressions on the User menu in RegEx Pal as a text file? The list of user ... . The latter could help us build a library of useful expressions.
wdavidhj 1.4k पूछा गया सितंबर 10, 2015
0 वोट
1 उत्तर 227 व्यूज़
Paratext सहायता में कहा गया है, टूलबार पर खोज बॉक्स में, आप वह पाठ दर्ज कर सकते हैं जिसे आप खोजना चाहते हैं या ... का उपयोग करना चाहिए? इसमें आपकी किसी भी सहायता के लिए धन्यवाद।
john_nystrom 312 पूछा गया जून 15, 2021
Paratext में
0 वोट
2 उत्तर 228 व्यूज़
(Robert Hunt writes) I installed PT7.5 on Win-XP as administrator, but run as a regular user. However, it keeps ... like Update is downloading but never seems to get anywhere.
गुमनाम पूछा गया अप्रैल 10, 2015
0 वोट
2 उत्तर 154 व्यूज़
मुझे कई बार ऐसा अनुभव हुआ है कि मैंने एक रेगुलर एक्सप्रेशन (regex) लिखा है जो RegEx Pal और Regex101.com (Python ... हुआ है या इस असंगति को परिमाणीकृत (quantified) किया गया है?
mvk1000 206 पूछा गया जून 30, 2025
PTXprint में
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
How good and pleasant it is when God’s people live together in unity!
Psalm 133:1
3,049 प्रश्न
6,007 उत्तर
5,672 टिप्पणियाँ
2,029 उपयोगकर्ता