Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?J)(?<open><(?<tag>h[1-6])>)(?<text>.*)(?<close><\/?(?'tag'h[1-6])>)
/
Umg

Description

Able to identify many header html tags in the text and group eachone.

Submitted by Adão Dias - 3 years ago