0 votes
329 views

I thought I should start a new topic on this instead of continuing the discussion on a different topic line.

I would like to delete all \s lines (\s, \s1, \s2, etc.) The lines are empty. I can easily delete the markers, but I’m not sure how to delete the lines.

The two following solutions have been proposed, but haven’t worked:
\s\d? [^\]* (did not find any of the \s markers)
\s\d? [^\r]+\r\n (deletes all lines one by one including verses)

Any other ideas?

Paratext by (127 points)
reshown | 329 views

2 Answers

0 votes
Best answer

Hi anon928451,

I think those the two RegEx you listed need another \ before \s at the beginning of the line.

Are there any \s which contain text, or are all \s in the project empty?

If they’re all empty, I think you can do a simple text search for \s and replace it with nothing. And then do another search for \s1, etc. You don’t need to use RegEx. Paratext will take care of cleaning up the empty lines. Of course, if you delete the \s and there was actually text after them, you’d be making a bit of a mess.

by (607 points)

Perfect. I didn’t know Paratext would take out the empty line. Thanks!

Just to add to @LivingField’s comment, you should search for \s1, \s2, etc first, and only delete \s as the last thing.

Why? Because if you delete all the \s markers, every \s1 will just turn into a random 1 hanging out in the middle of your text.

0 votes

Just to make sure it is clear, in RegEx Pal (available on the main Paratext menu, under Advanced), you can search for: \\s\d? [^\r]+\r\n and replace it with nothing to remove section headings. That includes the extra backslash that LivingField was talking about. (It’s possible that the previous posters didn’t mark their regular expression as “Preformatted text” when they were writing their post, so one of the backslashes was “eaten” in the output.)

Replying to @mnjames, this regular expression automatically takes care of all forms of section headings, \s, \s1, s2, etc. The regex contains \d?, which tells it to match an optional digit, so that matches all of those section heading forms. You don’t need to search for the \s markers separately.

by (1.4k points)

Related questions

0 votes
1 answer 273 views
Yesterday, while opening Paratext 9.1, a user got the following popup warning message: Le projet Ban sur votre ordinateur n' ... every time Paratext opens. How can I get rid of it?
n8_in_car 298 asked Nov 17, 2021
0 votes
1 answer 199 views
A user pointed out that when editing a translation, with the back translation open, back translation seemed to be adding new lines ... PTx 9.1.104 image895 351 7.02 KB Any ideas?
MSEAIT_LT 478 asked Jun 8, 2021
0 votes
2 answers 839 views
I recently reported to the developers that 9.1 (unlike 8 or 9.0) is regularly breaking lines in the middle of words ... s? If so, I hope the developers will reconsider this choice.
viverechristus 296 asked Dec 31, 2020
0 votes
1 answer 132 views
I am an administrator on a standard project and the project has numerous auxiliary projects associated for which I am not an ... set them all up. How can this be done? Thanks.
Jeremy Lang 103 asked Feb 12, 2025
0 votes
1 answer 757 views
How can I delete a project in registry.paratext.org that is no longer needed?
dcb 194 asked Mar 28, 2024
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Finally, all of you, be like-minded, be sympathetic, love one another, be compassionate and humble.
1 Peter 3:8
3,037 questions
5,994 answers
5,661 comments
2,022 users