How do I use a regular expression from a string variable

In my current project, I have a CMS that is supplying all the data. One field of that CMS is for regular expressions, which allows me to enter my own specific expressions to check in the front end. My problem is that when I pull the regular expression it is coming through the escaped characters, and I can not seem to find a way to get around this.

The expression that I am using is /^d+$/. As I mentioned this is stored inside my CMS and I am attempting to use it in the following code:

            const re = /^d+$/;
            const rea = new RegExp(this.question.QuestionExpression);
            console.log(re);
            console.log(rea);
            console.log(this.answer)
            console.log(re.test(this.answer));
            console.log(rea.test(this.answer));
            console.log(this.answer.toString().match(this.question.QuestionExpression))

this.question.QuestionExpression is the Regular expression that is coming in from the CMS. The problem is not getting it, but how to interperet once I have it. const re is currently just being used as a test and has no real bearing on the final outcome.

The outcome from the above code is as follows:

/^d+$/
//^d+$//
13 
true 
false 
null

As you can see in the second line, it is adding escape characters which are causing it to fail on the 5th line. I am sure that I am missing something simple, but any advice would be greatly appreciated.