Hi,

I'm stuck with a project for work.
My objectives are that i have a text box where an agent can write her story.
And this text need to be adjusted.

1. max length per line must be 59 symbols.(bytes)
2. If max length is achieved the line must be shortened, it must never be longer then 59(+4 see next point)
3. In front of the line it must add "RMN/"
4. After each line it must add ";"
4. No empty lines allowed in the text
5. No ";" allowed in the text

*Note*
I would like it to start with adding all lines behind each other. and then start cutting it in pieces.
This way I want to avoid lines with 1 or 2 word. As each of them cost us money.
So i think, first add them all behind each other (mind the space behind the full stop.) and then cutting them in 59, and then adding "RMN/" in front of all them. (and if possible ";" behind them.)


So if an agent added the text in a text box.

"Hoi collega’s,

Wij, hier bij de inplant Capgemini, zijn op het moment slecht bereikbaar omdat sinds gisteravond/vannacht een nieuwe telefooncentrale
In gebruik is genomen.
Het zou dus heel goed mogelijk zijn dat passagiers jullie zullen gaan bellen. De travelmanager is ook over de storing ingelicht.

Sorry voor het ongemak.

Gr.
Roland
"

It should be converted to :

RMN/Hoi collega’s, wij, hier bij de inplant XXXXXXXXX, zijn;
RMN/op het moment slecht bereikbaar omdat sinds;
RMN/gisteravond/vannacht een nieuwe telefooncentrale In;
RMN/gebruik is genomen. Het zou dus heel goed mogelijk zijn;
RMN/dat passagiers jullie zullen gaan bellen. De;
RMN/travelmanager is ook over de storing ingelicht. Sorry;
RMN/voor het ongemak. Gr. Xxxxxxx;

After parsing this, I will use this text to send it into another environment.

I really hope that you/anyone can help me with this.
As i'm really stuck at the moment.

Please feel free to ask if you need more info.

Kind regards,
Damien