diff --git a/greg/nfa.go b/greg/nfa.go index a3dd632..9b3811f 100644 --- a/greg/nfa.go +++ b/greg/nfa.go @@ -150,12 +150,12 @@ func (s State) checkAssertion(str []rune, idx int) bool { numMatchesFound := 0 for _, matchIdx := range matchIndices { if s.assert == PLA || s.assert == NLA { // Lookahead - return true (or false) if at least one match starts at 0. Zero is used because the test-string _starts_ from idx. - if matchIdx[0].startIdx == 0 { + if matchIdx[0].StartIdx == 0 { numMatchesFound++ } } if s.assert == PLB || s.assert == NLB { // Lookbehind - return true (or false) if at least one match _ends_ at the current index. - if matchIdx[0].endIdx == idx { + if matchIdx[0].EndIdx == idx { numMatchesFound++ } }