According to the docs,
The regex variable name can contain any of the following characters
[a-zA-Z_0-9]
. Other characters are not allowed.
If that's the only restriction, 123
would be a valid name, which you would refer to as value="\v{123}"
. How is the parser supposed to know you mean the rule named "123" and not one hundred and twenty-three vertical tab characters?
In most languages (including XML), names can't start with digits. If that were the case here, it would be possible to embed variable names in variable definitions, because \v{month}
or \v{_123}
is guaranteed to be invalid in a Java regex. (Other regex flavors are more liberal; they would interpret the braces as literal brace characters because {month}
and {_123}
can't be interpreted as range expressions.)
The only way to know for sure is to test it. It sounds like a nice feature to me; if it's not supported, maybe you should request it.