I have a variable with a long description, I want to take the 1st 25 words as a teaser and make a link to the page.
I can grab the 1st word with :
$desc =~ m|[\b([^\b]+?)\b]|;
my $shortdesc=$1;
Obviously I can brute force it 25 times, but I was trying to {25} it to see if I can get the correct data. Something like:
m|^([\b.*?\b]{25})|;
which is not working.
How far off am I ?
Andy