I have this substitution, which does not work:
exe 's/<<\(.*\)\%(,.*\)\?>>/<<\1,'.system('ark headings \1 | head -1').'>>'
What I want to do is:
capture some expression within double angle brackets:
paste opening double angle brackets back, followed by expression and comma:
and then paste it after filtering it through some external command:
system('foo \1 | head -1 | cut -f1')
follow it with the closing double angle brackets:
But I can't get the expression to work...