I'd like to assign the result of search range selection into a register, instead of printing it, e.g.:
What syntax I can use to achieve that?
You can use the
:yank ex command:
a is the register you want to use and has a default value.
Note: You used
;, in your command. It should be either
,, not both.