I have come across a piece of code in JScript:
RegExp.$1
Does anybody know what it does?
If I output it on its own, I get nothing not e
Like stated earlier, these constructs are called capturing parentheses groups and they're primarily used to reference the matches saved/remembered following the successful execution of an RegExp related operation.
Also, like stated earlier, I don't advise using any of them in your code unless a well controlled environment/context is secured, like the one provided by the native replace() method found on the String.prototype object.