コード例 #1
0
 def test_fullmatch_assertion(self):
     r = get_code(r"(?=a).b")
     assert rsre_core.fullmatch(r, "ab")
     r = get_code(r"(?!a)..")
     assert not rsre_core.fullmatch(r, "ab")
コード例 #2
0
 def test_fullmatch_2(self):
     r = get_code(r"a(b*?)")
     match = rsre_core.fullmatch(r, "abbb")
     assert match.group(1) == "bbb"
     assert not rsre_core.fullmatch(r, "abbbc")
コード例 #3
0
 def test_fullmatch_4(self):
     r = get_code(r"a((bp)*)c")
     match = rsre_core.fullmatch(r, "abpbpbpc")
     assert match.group(1) == "bpbpbp"
コード例 #4
0
 def test_fullmatch_1(self):
     r = get_code(r"ab*c")
     assert not rsre_core.fullmatch(r, "abbbcdef")
     assert rsre_core.fullmatch(r, "abbbc")
コード例 #5
0
ファイル: test_match.py プロジェクト: mozillazg/pypy
 def test_fullmatch_assertion(self):
     r = get_code(r"(?=a).b")
     assert rsre_core.fullmatch(r, "ab")
     r = get_code(r"(?!a)..")
     assert not rsre_core.fullmatch(r, "ab")
コード例 #6
0
ファイル: test_match.py プロジェクト: mozillazg/pypy
 def test_fullmatch_4(self):
     r = get_code(r"a((bp)*)c")
     match = rsre_core.fullmatch(r, "abpbpbpc")
     assert match.group(1) == "bpbpbp"
コード例 #7
0
ファイル: test_match.py プロジェクト: mozillazg/pypy
 def test_fullmatch_2(self):
     r = get_code(r"a(b*?)")
     match = rsre_core.fullmatch(r, "abbb")
     assert match.group(1) == "bbb"
     assert not rsre_core.fullmatch(r, "abbbc")
コード例 #8
0
ファイル: test_match.py プロジェクト: mozillazg/pypy
 def test_fullmatch_1(self):
     r = get_code(r"ab*c")
     assert not rsre_core.fullmatch(r, "abbbcdef")
     assert rsre_core.fullmatch(r, "abbbc")