tedana.bibtex.find_braces

find_braces(string)[source]

Search a string for matched braces.

This is used to identify pairs of braces in BibTeX files. The outside-most pairs should correspond to BibTeX entries.

Parameters:

string (str) – A long string to search for paired braces.

Returns:

obj:list of tuple of int – A list of two-element tuples of indices of matched braces.