console.log('\d' === 'd'); // true
Character 'd' is not a special character, why javascript want to slice the escape notation. It's better to keep the escape notation in my view.
When I want to fully match string-'\d' using regular expression, it just impossible! Taking the following code as an example.
console.log(RE.test('\d')); // it should log true
console.log(RE.test('d')); // it should log false
Unfortunately, you just cannot figure out a regular expression pattern.