Regular Expressions 101

Community Library Entry

0

Regular Expression
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–\-]+)\.$)?
"

Description

Python regex to extract fields from citation

Submitted by ballull07 - 3 years ago (Last modified 3 years ago)