Regular Expressions 101

Community Patterns

Get all header tag (<hn>) in html file

0

Regular Expression
PCRE (PHP <7.3)

/
<h([1-6]).*>.*<\/h\1>
/
g

Description

This regex get all header tag in html file with tag included

Submitted by Aubin - 9 years ago