I have a string of regular expressions and I want to classify whether this regular expression has a fixed prefix or not.
For instance:
abcdef.*g[0abc]{0,5}hi has the prefix abcdef
]1234vac.*12345 has the prefix ]1234vac
(abc)+123 has the prefix abc
but
[Az]+12345 does not have a fixed prefix (it starts with an unknown number of characters from the set of Az)
Do I really understand that this problem will not be solved in a general way?
source share