Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

2

Regular Expression
ECMAScript (JavaScript)

/
(url\(\\?['"]?)(.*?)(\\?['"]?\))
/
ig

Description

Finds all external resources declared as url() in styles. Handles different quote types if any, even escaped ones:

  • url(...)
  • url('...')
  • url("...")
  • url(\'...\')
  • url(\"...\")
Submitted by anonymous - 3 years ago