Thursday, March 5, 2020

Add quotation at the start and end of each line in Notepad++

Suppose we have column names
We want to prepare them to use in  a query and need to put double qutoes around them then put comma and combine all into one line.
press Ctrl + H and check Regular expression radio button.
 Find What: (.+) 
 Replace with: "\1"

it becomes

to put , (comma) at the ends of each line
 Find What: (.+) 
 Replace with: \1,

to combine them into one line
 Find What: \r\n 
 Replace with: