0 votes
258 views

Hi,
Does anyone know how I can find anywhere in my PT project where there are two quotes within the same paragraph? I can find them if they are in the same verse within the paragraph by using RegexPal:
\”(.*?)\“
But if there is a verse number between them, even though they are in the same paragraph, they don’t show up. What expression do I need to find them?

E.g. I want it to find Acts 10:17-18
\p While Peter was still trying to understand it, those 3 men from Cornelius walked into that town. They asked people, “Where does Simon live, the leather worker man? And the people told them how to get there. Then they went to that house and stood outside the gate, \v 18 and they asked, **“**Is Peter here?”

Thanks in advance :slight_smile:

Paratext by (213 points) | 258 views

3 Answers

+1 vote
Best answer

After thinking about it I realized you can just use the text selector between quotes like this:
”([^\\]|\\(?!i?([dlmpqs]\w*|b)\s))*?“
I added the ?i so that it correctly selects text in introductory paragraphs.

by (1.8k points)
reshown

Perfect, thank you!!

0 votes

Indirect answer: It may be better in the long run to use Basic Checks > Quotations (cf. How do I check quotation marks?) and Quotation Rules (Guide: Checking > Quotation Rules)

Direct answer: use (?s)".*?"

by (872 points)
0 votes

This is a context that will find prose paragraphs

\\p\w*\s([^\\]|\\(?!([dlmpqs]\w*|b)\s))*?(?=\\([dlmpqs]\w*|b)\s|\Z):::

To find quotes in the paragraph just add what ever code you want to find the quoted passages. However I avoid using . to find any character because it is not efficient and will stop at line breaks unless you add (?s). I prefer to find any character except the one I am looking for like this: ”([^“]*?)“

So this is the full code:

\\p\w*\s([^\\]|\\(?!([dlmpqs]\w*|b)\s))*?(?=\\([dlmpqs]\w*|b)\s|\Z):::”([^“]*?)“

The context is somewhat complicated and could be simplified depending on your markup.
It starts with \\p\w*\s , which selects \p \pm \pmo \pi1 \pc etc. It continues until it finds a tag that marks the end of a paragraph or the end of the chapter \\([dlmpqs]\w*|b)\s|\Z , which here includes all the tags that begin with \d \l \m \p \q and \s and the tag \b (but not \bd). The text selector is ([^\\]|\\(?!([dlmpqs]\w*|b)\s))*? which means any character that is not \ or any \ that is not followed by one of the tags that mark the end of a paragraph.

by (1.8k points)
reshown

Related questions

0 votes
1 answer 211 views
Paratext help says, In the Search box on the toolbar, you can enter the text you want to find or the regular expression ... list? Thanks for any help you can give me on this.
john_nystrom 312 asked Jun 15, 2021
0 votes
2 answers 375 views
The /ip marker is used in book introductions in the Good News Version. In Deuteronomy, the /ip marker is registering an error ... to keep that marker in the text. What can be done?
anon142050 118 asked Apr 17, 2019
0 votes
3 answers 402 views
I am trying to insert a set of figure expressions (\fig \fig*) into a project using the custom tool ... better way to bulk insert figures into the project? Paulus+Kieviet
Paulus Kieviet 517 asked Jan 25, 2023
0 votes
0 answers 125 views
The forward / back arrows don't advance the text in resources within a chapter. They do, however, go between ... . Options > Navigate each pane independently is not selected.
Paul 642 asked Apr 18, 2019
0 votes
3 answers 260 views
Hello, Anytime I use the \ip Introduction - Paragraph marker in Paratext, the words turns grey. I would be grateful if you can help me correct it. Thank you. anon878803
anon878803 132 asked Nov 8, 2019
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Just as a body, though one, has many parts, but all its many parts form one body, so it is with Christ.
1 Corinthians 12:12
3,037 questions
5,995 answers
5,661 comments
2,022 users