I have below text line in Notepad ++
Type, Layer, Env, key, action, timestamp, performedBy, desc,
I want to convert it to
'Type', 'Layer', 'Env', 'key', 'action', 'timestamp', 'performedBy', 'desc',
I write in find [a-zA-Z]*, and it gives me each comma separated string what shall I enter in replace to have them surrounded by quotes?
You can use ([a-zA-Z]*) in find and '\1' or '$1' in replace.
\1 or $1 (in newer versions of n++) means the first captured group.
See also this question.
If you search for ([a-zA-Z]*), the () indicates a group you can reference later.
Now you can write '$1', in the replace dialog.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With