Better regex to replace url() and test case added