Thanks, seems to work nicely!
PS: trailing slash missing from (/\A\s*[^\r\n]+\s*\z)
In reply to Re: Re: Counting words in headlines by mooseboy in thread Counting words in headlines by mooseboy