Removing characters from text in Notepad ++

After searching the official help files and even the Wiki for Notepad ++, I’m kind of disappointed, there is no explanation (or at least I couldn’t find anything) for this closed FF character, which for some reason throughout our text, I would like to remove this completely from my file, but there seems to be no resources how to handle this character using the & replace search procedure:

enter image description here

Support is much appreciated.

Oh, by the way: how can I use Notepad ++ to add a line to a specific line? So, after removing this FF character, add the line just before "ENGLISH"? (Of course, without this manually for everyone).

+6
source share
2 answers

You can use Find & Replace in RegEx mode. The "FF" character is an ASCII 12 character (you can see it in the Notepad ++ ASCII table), so you can match it in RegEx with \x0C ( 0C is 12 in hexadecimal format).

To remove it, search for " \x0C " and replace it with "" (nothing).

To replace it with line breaks, replace it with " \r\n " on Windows (" \n " on Linux).

To add a line break ahead to "ENGLISH", search for " (ENGLISH) " and replace it with " \r\n\1 ". Note that this will add a line break in each case of the string “ENGLISH”, even if part of the larger word: “MYENGLISHBOOK” will be split as “MY” and “ENGLISHBOOK”.

To add a line break before the word "ENGLISH" (but not when it happens inside a larger word), search for " \b(ENGLISH)\b " ( \b matches the word boundary) and replace it with " \r\n\1 "

+5
source

FF is a form feed character to replace it with a newline as follows:

  • Select FF , press Ctrl + H
  • Choose advanced mode
  • Replace \n
  • Click Replace All

enter image description here

+4
source

Source: https://habr.com/ru/post/978620/


All Articles