So far, I have:
$text = 'ju[color=1]s[/color]t a tes[color=2]t[/color]'; $text =~ s/ ( (?: (?: \[ [^]]* \] )* [^ [] ){3} (?: \[ [^]]* \] )* ) (?=[^ ]) /$1-/gx; print($text, "\n"); # ju[color=1]s[/color]-t a tes[color=2]-t[/co-lor-]
It's not quite there yet, but I have to go.
In reply to Re: Problem: how to split long words
by ikegami
in thread Problem: how to split long words
by nikos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |