JSFiddle - React, Tailwind, and code Playground

by Rajesh Danabal

JavaScript

var x = "​​​​​​​​​Program 9";
var r = /\\&([\d\w]{4});/gi;
x = x.replace(r, function (match, grp) {
    return String.fromCharCode(parseInt(grp, 16)); } );
console.log(x);  // http%3A%2F%2Fexample.com
x = unescape(x);
console.log(x);  // http://example.com