How to insert a line break every 79 characters?

Asked

Viewed 12,112 times

1

I am using Notepad++ and need to find a way (a macro maybe) to insert a line break every 79 characters. An important observation is that the line break at the end of each 79 characters cannot be done after a blank space and at the beginning of the other line cannot start with white space.

  • 1

    Does a find/replace with a regex not work? Test this regex: (.{79}) and have been replaced by $1\n and it worked. I did this test on Sublime Text, but I think it’s similar.

  • 1

    @Wakim, tested on Notepad++ 6.5.1 and ran puts as answer :).

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.