Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following is an example of characters per line in Notepad ++. I need to limit the characters per line to 14 characters.


I need it to look like the following:


How can I can limit the number of characters to 14 characters per line in Notepad++

share|improve this question
Can you please provide more information on the root goal you are trying to accomplish - is this just for editting or will the file be used by another system and need it this way, is it arbitrary characters or specific patterns? – Eric G Mar 20 '14 at 17:10
If you only need to do it once, take a look at the Column Mode feature and just delete the 13 last ones with a few clicks. – TheUser1024 Mar 20 '14 at 17:13

Do a Regex replace.
Replace ^(.{14}).*$ with \1. Keep the . matches newline option unchecked.

share|improve this answer
For some reason I have noted that the ^ character doesn't always work in Notepad++, it can't find a regex starting with it. Any idea as to why? – Kard Nails Mar 21 '14 at 19:33
It worked for me with OP's sample data. Can you post your sample on pastebin? – tumchaaditya Mar 21 '14 at 19:46
It was on another similar question, where the OP needed to remove all occurences of literal "\N" on each line except the first. So I suggested he run (\\N.*?)\\N multiple times. It worked, but another user posted this ^(.*?\\N.*?)\\N (when we thought the OP only wanted to remove the second occurence on each line) which did not work for the asker, nor for me. Notepad++ was simply unable to find it. No issues with your redex, though... – Kard Nails Mar 21 '14 at 20:16

In notepad++ you can use the find and replace function like this : enter image description here

share|improve this answer
You might want to add ^ and & to it just to make it fail safe and OP has mentioned characters. Its not just digits. – tumchaaditya Mar 20 '14 at 18:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.