I am trying to remove the brackets and 'url' from a string similar to this:
url('http://www.stackoverflow.com');
So it would just leave 'http://www.stackoverflow.com'
The furthest I have got to getting this working is
var myvar = url('http://www.stackoverflow.com');
myvar = myvar.replace(/[url()]/g, '');
But obviously this would mean that any 'u', 'r', or 'l' would be removed from the actual domain.
I guess the answer would be to only remove the first instance of each of the characters.
var myvar = "url('http://www.stackoverflow.com')";wrap in quotes to make it string. Open browser console to check errors