0 votes
142 views
I have had the experience a few times of writing a regex expression which works in RegEx Pal and also in Regex101.com (Python flavor), but does not work in PTXPrint. It seems that it has something to do with the way it handles carriage returns or new lines and back slashes. Has anyone else had this experience or quantified this discrepancy?
PTXprint by (206 points) | 142 views

2 Answers

0 votes
Interesting. Do you have any examples? We use the regex python module to process the regular expressions in your changes file. regex tends not to have too many restrictions (unlike say re). Please do note that by the time your changes run, the USFM has been converted to USX and back again (probably) and so has been regularised somewhat. If you are having trouble with your regexes, take a look at the View&Edit tab for the final SFM of the file you are wanting to process and check that your regex matches that appropriately.
by (656 points)
0 votes

A couple of things that might help:

If you include (?s) at the beginning of the pattern, it tells Python's regular expression engine to make the dot (.) match newline characters as well—allowing . to match across multiple lines.

We are currently working on some bug fixes which relate to how these changes are applied. So if the suggestion above doesn't help, then look out 2.8.18 which might solve it.

by (3.2k points)

Related questions

0 votes
1 answer 135 views
I have a regex that can extract all the figures in my Paratext project: \\fig .*\\fig\* I would like to have a ... . Thanks for any help you can give me on this. John Nystrom
john_nystrom 312 asked Nov 6, 2024
0 votes
2 answers 631 views
I need to find out what percentage of each book has been drafted. A count of how many verses in each book have text ... Thanks for any help you can give me on this. John Nystrom
john_nystrom 312 asked Aug 21, 2024
0 votes
2 answers 566 views
Dear reader. I would like to find \fq followed by any string thing including ɛ ɔ ɲ ŋ until the first \\ft ... the search to the first non-occurance? Thanks in advance, Bart
goodgoan 347 asked Aug 3, 2023
0 votes
2 answers 511 views
I received this email from a translator. I could write an elementary regex expression, but believe I would miss some ... me, I would greatly appreciate it. Thank you, james_post
[Moderator]
james_post
2.1k
asked Mar 30, 2023
+1 vote
5 answers 840 views
I want to change lowercase to uppercase in certain situations - for instance I want to change all lowercase after a colon to ... very simple list and then adding to it as you go.
Phil_Leckrone 9.8k asked Mar 2, 2022
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
They devoted themselves to the apostles’ teaching and to fellowship, to the breaking of bread and to prayer.
Acts 2:42
3,040 questions
5,996 answers
5,663 comments
2,022 users