Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(class+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?
/
gmiuJ

Description

regular expression to pull all css classes from a html file.

Submitted by emed - 3 years ago