This is odd. I have no immediate idea; you avoided what the camel book demonstrates as the a*a* pitfall, I think, since you ask for delimiting \W characters. I'm not sure, but I think forcing the
\W to match using +, and not accepting zero matches using *, would fix things. I also propose you anchor the pattern. You can also catch a free speed bonus by not capturing the inner brackets (note that this puts the rest into
$2 rather than
$3).
s/^((?:\w+\W+){200})(.*)/$1/si
Update: right,
tye++ confirms my intuition.
Makeshifts last the longest.