The +
within the regular expression means one or more of the previous item which is a .
meaning any character. You should use the expression ^(.*)$
where the *
means zero or more of the previous item. I like to add the ^
and $
to expressions to make it clear that I want the beginning and the end of the line, although in this case they are unnecessary.
The replacement text should have (as other answers indicate but do not explain) the round braces escaped. The replacement should be \(\1\)
. (Just checked in Notepad++ 6.6.7 and the doubled round braces ((\1))
previously stated in this answer does not work. Braces in the replacement string must be \(
and \)
.)
Notepad++ replacement expressions can be complex, round braces introduce the variations. See Multiple word search and replace in notepad++ for one example and links to more documentation.