How to extract text matching a regex using Vim?

This will replace each line with a tab-delimited list of coordinates per line:

:%s/.* title="(\(\d\+\),\(\d\+\))".*/\1\t\2

This task can be achieved with a much simpler solution and with few keystrokes using normal command:

:%normal df(f)D

This means:

  1. % - Run normal command on all file lines;
  2. normal - run the following commands in normal mode;
  3. df( - delete everything until you find a parenthesis (parenthesis included);
  4. f) - move the cursor to );
  5. D - delete everything until the end of the line.

You can also set a range, for example, run this from line 5 to 10:

:5,10normal df(f)D

If you want an ad hoc solution for this one-off case, it might be quicker simply to select a visual block using CTRL-v. This will let you select an arbitrary column of text (in your case, the column containing title="(X,Y)"), which can then be copied as usual using y.