As of #459, we skip ^, $, \b etc. in regexes, as they are irrelevant for our precise regex matching NFAs (accept only the specified regex and nothing more).
However, regex a{2}b can have two interpretations: it should match aab and only aab, but it can also match aab inside fffaabfff. The first approach is just an automaton matching a{2}b precisely, the other is .*a{2}b.*, which is what normal regex matchers do. We should have a flag (by default, set to the first approach), where the user can define which matching approach they want (what kind of NFA they get from the regex). Then, the ^ and $ will play a role. In the first approach, they are irrelevant, in the second, they must be accounted for.
As of #459, we skip
^
,$
,\b
etc. in regexes, as they are irrelevant for our precise regex matching NFAs (accept only the specified regex and nothing more).However, regex
a{2}b
can have two interpretations: it should matchaab
and onlyaab
, but it can also matchaab
insidefffaabfff
. The first approach is just an automaton matchinga{2}b
precisely, the other is.*a{2}b.*
, which is what normal regex matchers do. We should have a flag (by default, set to the first approach), where the user can define which matching approach they want (what kind of NFA they get from the regex). Then, the^
and$
will play a role. In the first approach, they are irrelevant, in the second, they must be accounted for.Originally posted by @Adda0 in https://github.com/VeriFIT/mata/issues/459#issuecomment-2482274416
Originally poster by @jurajsic in https://github.com/VeriFIT/mata/pull/459#issuecomment-2482340805.