Split Big Text in several under 3000 characters but cut at sentences

cherubin

Client
Регистрация
06.06.2016
Сообщения
92
Благодарностей
6
Баллы
8
Hi,

I'm looking for a solution to split an article in several texts which must be under 3000 characters but i would like to keep sense, so i need to cut the text logically at the end of a sentence.

So how could i count the number of characters of a text, and then split it with my 2 constraints :

- characters numbers
- punctuation markers as : " . ? ! "

Thanks
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

cherubin

Client
Регистрация
06.06.2016
Сообщения
92
Благодарностей
6
Баллы
8
Thanks for the links, however that's not only a text processing regex actions that i need i think. Or i don't know yet how to do that with regex.
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
  • Спасибо
Реакции: wheeljumpr и LightWood

cherubin

Client
Регистрация
06.06.2016
Сообщения
92
Благодарностей
6
Баллы
8
Ok, i understand better now. I thought you told me to do everything with a regex, the 3000 limit and the split by punctuation mark. In fact you do 2 actions, and i see now your point.

Thanks
 

Кто просматривает тему: (Всего: 2, Пользователи: 0, Гости: 2)