माफ़ कीजिए, मुझे नहीं दिखा कि आपने जवाब दिया था।
संभावनाओं को कवर करने के लिए कई लिखना संभव हो सकता है, पक्का नहीं। जिस परियोजना पर मैं काम कर रहा था, वहाँ \wj को तोड़ने वाले कई अलग-अलग चीज़ें थीं।
पदों द्वारा तोड़े गए \wj मार्कर के लिए, मैंने जो नियमित अभिव्यक्ति (regular expression) उपयोग की थी वह थी
(\\wj [^\\]+)(\r\n\\v \d+(-\d+)? )
प्रतिस्थापन स्ट्रिंग (Replacement string)
\1\\wj*\2\\wj
प्रतिस्थापन स्ट्रिंग में, \\wj के बाद एक अंतिम स्थान (space) है।
मूल रूप से, यह मार्कर-नहीं-होने वाले टेक्स्ट (non marker text) के लिए खोज करता है, जिसके बाद एक पद मार्कर (verse marker) आता है, और फिर पद मार्कर से पहले \wj को बंद कर देता है, और उसके बाद फिर से खोलता है।
इसके अलावा, यदि मेरी याद सही है, तो यदि आप 'replace all' कर रहे हैं, तो आपको इसे कई बार फिर से चलाना होगा।
BEH
Sorry, I didn’t see that you had replied.
It might be possible to write several that cover the possibilities, not sure. In the project I was working on, there were several different things breaking up the \wj
For a \wj marker that was broken up by verses, the regular expression I used was
(\\wj [^\\]+)(\r\n\\v \d+(-\d+)? )
Replacement string
\1\\wj*\2\\wj
In the replacement string, there is a final space after the \\wj
Basically, it searches for non marker text, followed by a verse marker, and then closes the \wj before the verse marker, and reopens after.
Also, if I recall correctly, if doing a replace all, you have to rerun this multiple times.
BEH
English से मशीन-अनुवादित