Regular Expressions 101

Community Patterns

Find all classes and ids in html

1

Regular Expression
PCRE (PHP <7.3)

/
(?:.*(?:(?:id="(?'id'\w+)")|(?:class="(?'class'\w+)")))
/
mg

Description

no description available

Submitted by Kris - 8 years ago