Reading this discussion, I didn't understand what this means:
$1X$2
Simply X?
And about this other code:
str = str.replace(/(<script.*?>)(.*)(?=<\/script>)/gi, function(x,y,z)
{return y+z.replace(/a/gi,'Z')})
Here is what I didn't understand:
?=- how does
function(x,y,z)works? i.e. from where it takex,yandz?
I'll be very grateful if someone could explain in a clear way this code.