Quote:
Originally Posted by Brett Merkey
@RbnJrg
Very nice regex. A keeper.
|
Thank you, glad that the code was able to help you too.
Quote:
I tested it in Calibre with 300 chars instead of 999 and the result looked much nicer than I had expected. I expected all the paragraphs to appear too similar in length, which is not cool. However, (esp. with "Dot All") the number of screen lines per paragraph varied in a nice way—I am not sure why.
|
Take in count that the regex will split the paragraphs not exactly in 300 chars (your case) but with a "few" chars more (until to find the end of the sentence). So, in some cases, those "few" more chars could be 30-50 more letters.
And also affect the output the place where the previous split was done. Suppose the case when after splitting, the ammount of letters before reaching the next </p> is 150. Then the next paragraph would splitted at with 150 chars (more or less) instead of 300. For that reason the paragraphs don't have all the same lenght.