On 7/10/10 at 9:21 PM, [email protected] (Doug) wrote:

I have a boat load of text files that need formatting, and I've made
a Text Factory that does everything but one last thing. I don't have
the option to do a Hard Wrap on a text file at n (say 70)
characters, at least not within a Text Factory. I'm sure I could
write a script to do this ... well I'm sure someone can. Are YOU
that person? :) Any help would be appreciated. Thanks.

The hard wrap task can be done as a grep replacement.

Search on "(.{1,69}) " (without the quotes I used to make clear the last character of the search pattern is a space character)

and replace with \1\r

The search pattern matches any pattern at least 1 character long and at most 69 characters followed by a space then replaces the following space with a return.

--
You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group.

Reply via email to