I have the variable label
const label = 'test'
and the regex
{ name: /test/i }
What I want is know if I can use the variable label
inside the regex, something like this
{ name: `/${label}/i` }
Is it possible?
I have the variable label
const label = 'test'
and the regex
{ name: /test/i }
What I want is know if I can use the variable label
inside the regex, something like this
{ name: `/${label}/i` }
Is it possible?