You could use the same technique with a pattern of (.{2000}) to get batches of
2,000 characters and insert a couple returns between them using a replacement
pattern of \1\r\r. Actually you might want to do this before adding the spaces
assuming the spaces don't count against the total.
If you need to do it often or the files are very big a command line solution
might be easier. You can use "split" to segment the one file into many which
are 2,000 characters long and then pass the whole collection through "sed" to
insert the spaces using similar regex patterns described above.
[fletcher]
> On Jan 26, 2016, at 4:25 AM, Thibaut Jacob <[email protected]>
> wrote:
>
> Hi Simon,
>
> For inserting a space every 5 characters, you could do this through the Find
> Dialog. There is a little checkbox "Grep" on the bottom of the window which
> allows to use Regular expression in your search.
> The regular expression would be something like this: (.{5}), which means
> "capture every 5 characters". The brackets represent a capture group, the dot
> any character and {5} means that we want to match 5 times the pattern.
>
> In the replace field you can put : \1
> Make sure to put a space after \1. This means that we replace the 5 captured
> characters by themselves with an additional trailing space.
>
> I am not sure what you mean by separate page though.
> Hope this helps somehow.
>
> Regards,
> Thibaut Jacob
>
>
> On Tuesday, January 26, 2016 at 1:13:04 PM UTC+1, Simon Allen wrote:
> Hi,
>
> I am anew to BBEdit. I want to insert add a space every 5 characters of a
> text file and then group every 2000 characters as a separate page. Will
> BBEit do this or I need other software.
>
>
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or would like to report a problem, please email
> "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit
> <http://www.twitter.com/bbedit>>
>
> ---
> You received this message because you are subscribed to the Google Groups
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].