I have a file whose content is roughly something like
insert into FooBar values (13, 19, 220, 108);
// some text,
// some more text
insert into MixMax values (22, 5, 87, 1);
// and so on
insert into HooHoo values (8, 37, 222, 51);
// etc ...
Now, I'd like to yank the first numbers after the string values (
into a variable, preferably in one go.
I thought of something like :g/values (\(\d\+\)/let @a .= ', ' . submatch(1)
and would then have expected the register a
to be ,13,22,8
.
Unfortunately, with this method, I only get the commas, but not the submatches, i.e. the register's content is ,,,
What can I do to solve this problem?