Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?<Author>[A-Za-z,\s]+?)(?:\set al)?:(?<Title>[A-Za-z0-9\/,\s]+)\.\s(?<Publisher>[A-Za-z\s]+)\s(?<Volume>\d+)(?<Issue>\([A-Z]?\d+[A-Z]?\))?:\s?(?<StartPage>[A-Za-z]?\d+)-(?<EndPage>[A-Z]?\d+[A-Z]?)[,.\s]\s?(?<Year>\d{4})
/
g

Description

Patter1 - first iteration

Submitted by Ali Momeni - 8 years ago