Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
background\-image:(?: {1,}|)url(?: {1,}|)\(['|"](.*)['|"]\)
/

Description

regex to fetch the URL of the background-image CSS-Propertie

Submitted by Mutator - 10 years ago