Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-06-13 10:46
Updated·2021-06-13 10:50
Flavor·Python

r"
(?P<authors>[a-zA-Z ,.&]+)\((?P<year>\d{4})\)\.(?P<title>[\w \-:]+)[,.](?P<publication>[\w \-:]+)[,. ]+(?P<volume>[0-9]+)?[,. p]*(?=(?P<index>[0-9–\-]+)\.$)?
"
Open regex in editor

Description

Python regex to extract fields from citation

Submitted by ballull07