In extension to the answer of Duroth, you can use the following php code to insert the shy-hyphens
$longest_length = 15;
$string_with_long_word = 'short lonngerrrrr lonnnnnnnggeeeeeeeeeeeeeeeeeessssssssssssssssstttttttttttttt and another looooooooooooonnnnnnnnngwwooooooooororoooorrrrrd';
$string = preg_replace_callback("/[a-z0-9]{{$longest_length},}/", 'putShyHyphen', $string_with_long_word);
function putShyHyphen($matches) {
$string = $matches[0];
$newstring = '';
for ($i=0; $i';
echo $string;