My @thesis entries in my .bib file have in the field institution information about both department and school. I'm creating a style sheet for a journal where only the name of the school (i.e. university, college, vel sim.) is needed.

As a result, I'm looking for some code that will scan the field institution in the @thesis entries and delete text from the beginning until (and including) the final instance of . (period + space).

If no such cases are found, as in miller1923 below, it shouldn't do anything. If multiple cases are found, as in anderson2008 below, it should delete all of them. In the end, only the names of the universities should remain.

\usepackage[style = authoryear-comp]{biblatex}
    AUTHOR = "Oscar Miller",
    INSTITUTION = "Harvard University",
    TITLE = "War -- what is it good for?",
    TYPE = "Ph.D. dissertation",
    YEAR = "1923"}
    AUTHOR = "Peter Smith",
    INSTITUTION = "Department of Chemistry. Stanford University",
    TITLE = "Oxygen and stuff",
    TYPE = "Ph.D. dissertation",
    YEAR = "2003"}
    AUTHOR = "John Anderson",
    INSTITUTION = "Department of Lang. \& Litt. Swarthmore College",
    TITLE = "Shakespeare and the English he wrote",
    TYPE = "MA thesis",
    YEAR = "2008"}

enter image description here

1 Answer 1


You should be using biber as a backend for biblatex in order to do things like this. Then it's quite easy. Add this to your preamble:

       \step[fieldsource=institution, match=\regexp{\A.+\.\s*(.+)\z}, replace=\regexp{$1}]

Since you mentioned that this is for a style, you should really use \DeclareStyleSourcemap instead of \DeclareSourcemap (same syntax, just replace the macro call). This can then be put in your style files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .