Home > Article > Backend Development > How to interpret this regular expression
<code> const VARIABLE_REGEX = <<<'REGEX' \{ \s* ([a-zA-Z_][a-zA-Z0-9_-]*) \s* (?: : \s* ([^{}]*(?:\{(?-1)\}[^{}]*)*) )? \} REGEX;</code>
<code> const VARIABLE_REGEX = <<<'REGEX' \{ \s* ([a-zA-Z_][a-zA-Z0-9_-]*) \s* (?: : \s* ([^{}]*(?:\{(?-1)\}[^{}]*)*) )? \} REGEX;</code>
You will need to use this https://www.debuggex.com