Extract background image url

Benchmark created on


Setup

var str = "url(http://www.europeword.com/blog/wp-content/uploads/europe-long-name.jpg)"

Test runner

Ready to run.

Testing in
TestOps/sec
replace
str.replace(/^url\(|\)$/ig, "")
ready
match
str.match(/^url\((.*?)\)$/i)[1]
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.