简体   繁体   English

在Notepad ++中的每一行的末尾添加一个字符

[英]Add a character ) to the end of every lines in Notepad++

I'd like to add the ) character (close bracket) to the end of all lines. 我想将)字符(右括号)添加到所有行的末尾。

I see CR is the end symbol of every lines. 我看到CR是每一行的结束符号。 (Menu > View > Show Symbol > Show end of line) (菜单>查看>显示符号>显示行尾)

I tried to replace \\r with )\\r in Regular expression mode but it didn't work. 我试图在正则表达式模式下用\\r替换\\r )\\r但它不起作用。

How do I do this? 我该怎么做呢?

Use $ to match end of line in regular expression mode. 使用$匹配正则表达式模式下的行尾。 Replace with \\( , slash is to escape 替换为\\( ,斜线是逃避

在此输入图像描述

You need to match extended or regular expression and replace "\\n" with ")\\n". 您需要匹配扩展或正则表达式并将“\\ n”替换为“)\\ n”。 At least this worked by me so far. 到目前为止,至少这对我有用。 According to this there can be differences though Difference between CR LF, LF and CR line break types? 根据这个,虽然CR LF,LF和CR断线类型之间存在差异但可能存在差异

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM