Find end of line in regex with notepad ++

I work with Notepad ++, and I would like to find a new line (after a hyphen, extra space and some characters at the end of the line). I came up with something like this:

  • -[ ]?.*\n

I also tried:

  • -[ ]?.*(\n)
  • -[ ]?.*(\r\n)
  • -[ ]?.*[\r\n]
  • -[ ]?.*[\n]

None of this worked out. I am working on Windows if that matters.

+4
source share
1 answer

Do you really need to match a line break? If not, you can simply use $ , which is the anchor for the end of the line.

+21
source

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


All Articles