the title says it all, I can't find a option in notepad+ for removing for example character 10 to 20.

Do I miss something or is there a other option for it?


original line:

<div id="dot"><a id="69149d5ac2-70"  href="

must look like:

<div id="dot"><a href="

I'm not sure this is what you're asking, but if you need to delete chars 10 to 20 of each line, a fast way of doing this is block selection.

You just keep ALT pressed while dragging to select a rectangular block of characters. Then hit DEL to delete them.

  • thisis the easiest sollution for me :) thanks – Chris Sep 19 '10 at 18:47

Unfortunately, Notepad++ doesn't support {i,j} bounds for atom counts in regexes.

The following instructions will remove the string based on its contents. It may select other strings in your file that are similar so be careful with the Replace All button.

  • Select Replace from the Search menu.
  • In the Find What field enter: (<a) id="[0-9a-f-]*" (there's a space after the final quote).
  • In the Replace With field enter \1.
  • Select Regular Expression in the Search Mode box.
  • Use Find Next, Replace and Replace All as needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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