示例#1
0
 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
示例#2
0
 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