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!