I am trying to add ('
to the front of every line.
I tried
Find what: ^
Replace with: ('
and bracket did not show up.
How can I add it to the beginning of each line?
('
to the front of every line(
is a special character, you need to escape it with \
Menu "Search" > "Replace" (or Ctrl + H)
Set "Find what" to ^
Set "Replace with" to \('
Enable "Regular expression"
Click "Replace All"
Before:
Lorem ipsum dolor sit amet adipiscing ultricies varius egestas.
Lorem ipsum dolor sit amet adipiscing ultricies varius egestas.
Lorem ipsum dolor sit amet adipiscing ultricies varius egestas.
Lorem ipsum dolor sit amet adipiscing ultricies varius egestas.
After:
('Lorem ipsum dolor sit amet adipiscing ultricies varius egestas.
('Lorem ipsum dolor sit amet adipiscing ultricies varius egestas.
('Lorem ipsum dolor sit amet adipiscing ultricies varius egestas.
('Lorem ipsum dolor sit amet adipiscing ultricies varius egestas.
An alternative to using Find/Replace could be to use a Macro:
Example of how to use macros in Notepad++:
('
to the start of every line is not the same as joining all the lines up and separating them with ','
, with no (
anywhere after you are finished. Are you answering some other question?
Just informational (RegEx replace is the best in this situation)...
There is Column Mode Editing in Notepad++, so you can:
('
.Column Mode is more useful with Column Editor when you are inserting numbers.