Construct NFAs for regex matching inside text #464
Labels
For:library
The issue is related to library (c++ implementation)
Module:nfa
The issue is related to Nondeterministic Finite Automata
Type:discussion
A discussion of some particular topic in wider audience
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 #459 (comment)
Originally poster by @jurajsic in #459 (comment).
The text was updated successfully, but these errors were encountered: