Extracting capture from transfer reactions