in reply to Re: Truncating real text
in thread Truncating real text

Solving the parentheses problem can't be done correctly using only regular expressions as this example demostrates:
print trunc(6, "Are we not men (or (not) woman), we are devo."), "\n";
But embedded parentheses are not common, so you might just ignore this problem.
A picture is worth a thousand words, but takes 200K.