RegExp means Regular expression (here a link to MDN MDN - RegExp.
What the string you posted means is that you can use a substring OR a regular expression to find the string to replace, and a new subStr OR a function as 2nd argument to replace with.
Just to be sure when you say you have googled the MDN web tools page are you speaking of this one? MDN - String.prototype.replace
Because there you can find few examples from the simplest to some more complex ^^