I'd like to change everything after '=img' into something else, following code does not work:
var j = '/test/123=img?xyze'
var j = '/test/123=img?xyze' j=j.replace(/(=img)(.*)/, '$1_somethingElse'); console.log(j); // "/test/123=img_somethingElse"
=img and the rest would be in
$2 if you needed it.