Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
url\([ \t\r\n\f]*(\"([^\n\r\f\\"]|\\(\n|\r\n|\r|\f)|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*\"|\'([^\n\r\f\\']|\\(\n|\r\n|\r|\f)|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*\'|([!#$%&*-~]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*)[ \t\r\n\f]*\)
/
ig

Description

Matches a valid CSS3 url() property

Submitted by sciyoshi - 9 years ago