in reply to Inserting characters into strings

$space[$i] =~ s/((?:[A-Z][^A-Z\n]*){10})/$1\n/gx;
Boris

Replies are listed 'Best First'.
Re: Re: Inserting characters into strings
by Anonymous Monk on Jun 01, 2004 at 14:57 UTC
    Thanks Boris, I tossed in:
    $i = 0; while ($i < $n) { $space[$i] =~ s/((?:[A-Z][^A-Z\n]*){10})/$1 /gx; $space[$i] =~ s/((?:[A-Z][^A-Z\n]*){100})/$1 <br \/>/gx; $i++; }
    and it did the trick beautifully. Not exactly what you suggested, but almost. Thanks. -Matt