Regular Expressions 101

Community Patterns

nb section-subsection with marginal note

0

Regular Expression
PCRE (PHP <7.3)

/
(?:<div\s+class=.?body\s*section.?>)+\s*(?><div[^>]+head-\d\s+sectionheading[^>]*>)((?:<span[^>]*>)?(?:[^<]+)(?:<\/?span[^>]*>)?(?:[^<]+)(?:<\/?span[^>]*>)?)<\/div>(?:<\/?(?:div|span|a)[^>]*>\s*)+([\d.]+)<\/span>(\([\d.]+\))(?:<\/a>)?<\/span>
/
gis

Description

added experimental support for historical notes (?:<div[^>]+historicalnote[^>]*>[\w,.\s]+</div>)?

Submitted by anonymous - 3 years ago