0 votes
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 ago by (192 points)

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.
ago by (390 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.

ago by (2.8k points)

Related questions

Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
If anyone destroys God’s temple, God will destroy that person; for God’s temple is sacred, and you together are that temple.
1 Corinthians 3:17
2,798 questions
5,648 answers
5,208 comments
1,670 users