The .replace method also takes regular expressions as the first argument, and if you group part of the text, you can include it in your output text using a "backlink", using the "$" symbol and a number indicating which group to use ($ 1 , $ 2, etc.).
Since the value "$" has a special meaning in this context, it needs to be escaped, and "$$" is an escape sequence to create a normal "$", so you just need the "$$$$ Ashok" in your code.
source share