NFA for regular expression match