Add a character ) to the end of every lines in Notepad++
39,882
Solution 1
Use $
to match end of line in regular expression mode. Replace with \(
, slash is to escape
Solution 2
You need to match extended or regular expression and replace "\n" with ")\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?
Author by
Ronaldinho Learn Coding
Updated on October 07, 2020Comments
-
Ronaldinho Learn Coding over 3 years
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. (Menu > View > Show Symbol > Show end of line)
I tried to replace
\r
with)\r
in Regular expression mode but it didn't work.How do I do this?
-
inf3rno over 8 years@RonaldinhoLearnCoding can you check whether \n works in your case? just for curiosity...
-
Ronaldinho Learn Coding over 8 yearsthis works too along with replace
\r
with)\r
inextended
mode -
Ronaldinho Learn Coding over 8 yearsNo, replacing
\n
with)\n
does not work in my case in both extended or regular expression mode because my end line symbol isCR
, I need\r
-
inf3rno over 8 years@RonaldinhoLearnCoding Thanks!