regex to add new line after period, but only if followed by a capital character
-
Hello,
I have some text that looks like this:
Once upon a time, a princess lived in a beautiful castle.She was bored and wanted an adventure.Along came a prince who took her far from her home. Then she was happy to stay home.
I need it to look like this:
Once upon a time, a princess lived in a beautiful castle.
She was bored and wanted an adventure.
Along came a prince who took her far from her home. Then she was happy to stay home.Here is what I’ve tried:
Search for: .[[:upper:]]
replace with: .\r[[:upper:]]
which resulted in:
Once upon a time, a princess lived in a beautiful castle.
[[:upper:]]he was bored and wanted an adventure.
[[:upper:]]long came a prince who took her far from her home. Then she was happy to stay home.I only want a new line character if the period is followed by an uppercase character, not a space. Any help would be greatly appreciated.
-
Find:
\.(?=\u)
Replace:.\r\n
Search mode: Regular expression -
@Alan-Kilborn Thanks! Worked a treat!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login