Follow

bibtex citekey regex 

Does somebody have a that will find the citekeys in a file? I want `\cite{foo, bar}` to match 'foo' and 'bar'. This seems like something that would be easy to find, but I haven't found a usable solution. This is my best attempt so far, which works only when there is one key per command:

\\[C|c]ite[t|p|year|author|yearpar]?.*?\{\s*(.+?)\}

· · Web · 2 · 4 · 1

bibtex citekey regex 

@twsh A specialist mailing list would be the best place to ask and others to find again in future. Assuming you are searching a latex file, having to search case sensitive use of cite keys suggests inconsistent use of the cite key command?

bibtex citekey regex 

@citc `\citet` and `\Citet`, for example, are different commands with different results, and I want to catch both.

Success may depend on your regex engine; in GNU/Linux had to use control escape characters for the backstroke symbol, i.e. [\]Cite but this fails with java regex engine. It could be a case of RTFM before you post to those geek mailing lists. Good luck! :)

Sign in to participate in the conversation
Scholar Social

Scholar Social is a microblogging platform for researchers, grad students, librarians, archivists, undergrads, academically inclined high schoolers, educators of all levels, journal editors, research assistants, professors, administrators—anyone involved in academia who is willing to engage with others respectfully.