On 9/22/2007, Walter Ian Kaye said:

I think I would loop through the lines, counting/summing as I go. Collect
the 4K chunks in a list, and after that loop's done, then loop through
the chunks and write them out.

If it helps any, your search pattern is going to look something like this:

[\w\W]{1,4095}[\r\Z]

That will select up to 4096 characters, and the last character will always
be a \r or the end of the document.

There are, of course, other ways to do it.

If you're going to run that pattern from an applescript, don't forget to
escape your escapes:

[\\w\\W]{1,4096}[\\r\\Z]

Seth


--
------------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_script.shtml>
List archives: <http://www.listsearch.com/bbeditscripting.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to