Regular Expressions 101

Community Patterns

nb - legacy section/subsection finder

1

Regular Expression
PCRE (PHP <7.3)

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

Description

no headings

Submitted by anonymous - 3 years ago