- or download this
s#(((\e[^a-zA-Z]*[a-zA-Z])*.){1,79})\s#$1\n#g;
- or download this
my $esc= qr[\e[^a-zA-Z]*[a-zA-Z]];
my $char= qr[(?:$esc)*.];
s[((?:$char){1,79})\s][$1\n]g;
s[((?:$char){79})($char)][$1\n$2]g;
- or download this
my $esc= qr[\e[^a-zA-Z]*[a-zA-Z]];
my $char= qr[(?:$esc)*.];
s[((?:$char){1,79})(\s|$)][$1.($2?$/:"")]ge;
s[((?:$char){79})($char)][$1\n$2]g;
- or download this
my $esc= qr[\e[^a-zA-Z]*[a-zA-Z]];
my $char= qr[(?:$esc)*.];
...
s[((?:$char){1,79})\s][$1\n]g;
s[((?:$char){79})($char)][$1\n$2]g;
chomp;
- or download this
my $len= 79;
my $esc= '\e';
...
s[(?:^|(?<=\s))((?:$char){1,$len}(?:$eseq)*)\s][$1\n]g;
s[(?:^|(?<=\s))((?:$nonsp){$len}(?:$eseq)*)(?=[^$esc\s])][$1\n]g;