I want a register to contain backslashes, but when I try they get removed. Example (for
"first_name last_name" → "last_name, first name" in a file with all lines according to regex pattern:/^[^ \n]+ [^ \n]+$/gm):
- Setting register 1 with let:
:let @1="%s/\(.*\) \(.*\)/\2, \1/g"
- Displaying register 1 (inserted at the current line):
:put 1
- The insertion:
"%s/(.*) (.*)/^B, ^A/g"
I want that register to contain backslashes so that it can be executes as a command in command mode.