I am looking for the name (definition?) of X in:
A regular expression is X iff it has exactly one possible match.
Examples: <empty regex>, abc
, \.
, [.]
, a|a
, a{8,8}
, \Q.*?\E
Counterexamples: .
, a*
, a|b
, \d
, a?
I would call such a regex constant. Can I use this name? Is there a similar concept?
Additionally, I would say a regex is literal iff it is constant and the single match is equal to the regex itself (f.e. a
but not [a]
).
NB: I would greatly appreciate some references, because I would like to cite them.
Research done:
Check if a regex is ambiguous uses "ambiguous" but in another way ("a string can be matched by more that one ways from 1 regex")
I have asked it on math SE but was redirected here.