def test_not(self): matcher = PostMatch(Drop(Any()[:]) & Any(), r'[0-9]', not_=True) matcher.config.no_full_first_match() results = list(matcher.parse_all('12a')) assert results == [['a']], results
def test_normal(self): matcher = PostMatch(Drop(Any()[:]) & Any(), r'[0-9]') matcher.config.no_full_first_match() results = list(matcher.parse_all('12a')) assert results == [['2'], ['1']], results