diff --git a/nfa.go b/nfa.go index 31cdcfc..8b98ee7 100644 --- a/nfa.go +++ b/nfa.go @@ -136,7 +136,7 @@ func (s State) checkAssertion(str []rune, idx int) bool { strToMatch = string(runesToMatch) } - matchIndices := findAllMatches(Reg{startState, startState.lookaroundNumCaptureGroups}, strToMatch) + matchIndices := findAllMatches(Reg{startState, s.lookaroundNumCaptureGroups}, strToMatch) numMatchesFound := 0 for _, matchIdx := range matchIndices {