in reply to
regexp word break help
Or this (since you said you wanted to do it with a regex) -- this time, we'll assume that you actually want to truncate the string, rather than break it into shorter lines:
s/(.{1,45}) .*/$1\n/;
[download]
Comment on
Re: regexp word break help
Download
Code
In Section
Seekers of Perl Wisdom