With this function I get all relative links in a ajax loaded css file and replace them with a custom path.
var newCss = cssText.replace(/url\('([^)]+)'\)/gm, function (a, b) {
return 'url(\'' + 'myCustomPath' + b + '\')';
});
But this one seems to change only links with a single quote.
How can I use it also with double quotes and no quotes?
Try replacing this:
by this :