Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?<author>[A-Z](?:(?!$)[A-Za-z\s&.,'’])+)\.\s["“](?<title>[A-Z](?:(?!$)[A-Za-z\s&.,'’])+)\.["”]\s(?<container>[A-Z](?:(?!$)[A-Za-z\s&.,'’])+),\svol\.\s(?<volume>\d+),\sno\.\s(?<issue>\d+),\s(?<year>[0-9]{4,4}),\spp\.\s(?<pages>\d{1,4}[-–]\d{1,4})\.
/
gm

Description

MLA journal article Works Cited bibliography entry

Submitted by Ken M. Penner - 3 years ago