Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(<img[^>]*class=\"[^>]*\bfoo\b[^>]*\"[^>]*>)
/
ig

Description

Finds images that have a certain class (in this case, "foo")

Submitted by Todd Dukart - 8 years ago