REGEX in Notepad++ find/replace

前端 未结 2 1289
长情又很酷
长情又很酷 2021-01-26 02:39

Is it possible to use the value of a regex in the \"FIND\" part of a find/replace in Notepad++ ?

Here\'s what i have :

FIND: ^.{105}.*(.)
REPLACE: \\r\\         


        
2条回答
  •  执念已碎
    2021-01-26 03:00

    I think you want something along these lines:

    Find: ^(.{105}.) Replace: \1\r\n

    You need to wrap the thing in a capture group otherwise your ^ will force it to only match the beginning of the line. You'll also need to include the first capture group as part of the replacement string so it won't nuke the entire matching.

提交回复
热议问题