Regular Expressions 101

Community Patterns

nb - legacy section/subsection with marginal note finder

1

Regular Expression
PCRE (PHP <7.3)

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

Description

no description available

Submitted by anonymous - 3 years ago