how to find end-of-sentence in search-replace?

General comments and questions. Technical support.
Post Reply
kenfhill84083
Posts: 19
Joined: Thu Dec 08, 2022 9:17 am

how to find end-of-sentence in search-replace?

Post by kenfhill84083 »

I have been trying to use search-replace to find the end of sentences in order to break apart paragraphs into sentences each on its own line. I was hoping to use regex (at which I am a beginner).

The following regex string works in Libreoffice Writer but does not work in Atlantis:
([.|?|!|(.”)|(.’)|(?”)|(?’)|(!”)|(!’)])\s

The replace string is : $1\n

In Atlantis, you?” becomes you? ¶ ” (with ¶ being the end of a line - the line ends with the question mark and the next line has the quotation mark by itself). see attachment

Is there already a code - similar to ^p - but to find sentences instead? If not, what is wrong with my regex?

Thanks.
Attachments
Atlantis _  regex to find sentences.png
Atlantis _ regex to find sentences.png (1.88 KiB) Viewed 2887 times
User avatar
admin
Site Admin
Posts: 2734
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Re: how to find end-of-sentence in search-replace?

Post by admin »

If you want to replace the white space between sentences with something, you can search for the following pattern:

Code: Select all

[\!\?.]"{0,}|^w|
It matches the white space itself.
kenfhill84083
Posts: 19
Joined: Thu Dec 08, 2022 9:17 am

Re: how to find end-of-sentence in search-replace?

Post by kenfhill84083 »

Thanks. Is there a detailed repository for these kinds of regex snippets?
User avatar
admin
Site Admin
Posts: 2734
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Re: how to find end-of-sentence in search-replace?

Post by admin »

There is no repository per se. But please see the following Help articles:

https://www.atlantiswordprocessor.com/en/help/regex.htm
https://www.atlantiswordprocessor.com/e ... _email.htm

If you need help with regular expressions, just ask.
kenfhill84083
Posts: 19
Joined: Thu Dec 08, 2022 9:17 am

Re: how to find end-of-sentence in search-replace?

Post by kenfhill84083 »

admin wrote: Sat Jun 24, 2023 4:53 pm There is no repository per se. But please see the following Help articles:

https://www.atlantiswordprocessor.com/en/help/regex.htm
https://www.atlantiswordprocessor.com/e ... _email.htm

If you need help with regular expressions, just ask.
Thanks for the response and the invitation. The responses here are very helpful.
Post Reply