Is there a fool-proof way to extract all bibtex citation-keys that are cited in a .tex file?
I do not mean regular-expression magic on the .tex-file because this is bound to cause problems when switching between natbib, apacite etc. which all use different citation commands. Also, citations made using \nocite{*} will not be included ...
I though about looking into the .bbl file which does contain all references included in the final document but the format of the .bbl file differs vastly between packages as well such that the key-extraction is difficult.