There are several text files with formatted articles, but historically, the text merged into one line, and the headings go together with the previous text. It is necessary to put a line break before each big letter (in upper case).
Those. Now the text has the following form "ParagraphTitleParagraph", you need to make it so:

"Paragraph

Title

Paragraph "

Can this be done?

  • Are you sure that there are no capital letters inside paragraphs and headings? - Grundy
  • I add, the line break needs to be added only if there is no space character in front of the capital letter, but only other letters (that is, if the text has merged). - faxulofa
  • Grundy, you're right, added the post above. - faxulofa
  • Letters Russian or English or and such and such? - Grundy
  • an even larger letter within a sentence and at the beginning may be in quotes. more brackets - splash58

2 answers 2

Press ctrl - H , set the search mode - regular expression and enter
Find: ([^\ ])([A-ZА-ЯЁ])
Replace with: $1\r\n$2

  • I recommend to change to (\S)([A-ZА-ЯЁ]) because the line (\S)([A-ZА-ЯЁ]) , tabulation, an unbreakable space followed by a capital letter, will also satisfy your expression. - ReinRaus

For English text, you can use the following regular expression

 ([az])([AZ]) 

Specify in the replacement field

 $1\n$2 

And also tick "Match Case"

enter image description here

  • And if the previous sentence ends with a punctuation mark or a digit? - Darth
  • Grundy in np ++ has no problems with Russian tests in regulars. Maybe only with Yo - splash58
  • @Darth, then will not find :) - Grundy
  • @ splash58, if you don’t even need to check their English text - Grundy
  • Grundy somehow I did not think that this is the text of a potential opponent 6) - splash58