Beispiel #1
0
 def test_ahead(self):
     regex = RegExpBuilder()
     regex.exactly(1).of("dart")
     regex.ahead(RegExpBuilder().exactly(1).of("lang"))
     regex = regex.getRegExp()
     
     self.assertTrue(regex.match("dartlang").group() == "dart")
     self.assertTrue(regex.match("dartpqr") is None)