Regular Expressions 101

Community Patterns

Delete repeated bibitem

0

Regular Expression
PCRE2 (PHP >=7.3)

/
([{,]([A-z0-9 ]+?)[,][A-z0-9, ]*?)\2+([,}])
/
gm

Description

Search for a repeated bibitem inside the curly braces of a latex \cite command and removes it.

Submitted by anonymous - 2 years ago