mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Python: re test with \Z
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
| test.py:29:12:29:19 | Str | This regular expression includes an unmatchable dollar at offset 3. |
|
||||
| test.py:30:12:30:23 | Str | This regular expression includes an unmatchable dollar at offset 3. |
|
||||
| test.py:31:12:31:20 | Str | This regular expression includes an unmatchable dollar at offset 2. |
|
||||
| test.py:78:12:78:26 | Str | This regular expression includes an unmatchable dollar at offset 3. |
|
||||
| test.py:41:10:41:27 | Str | This regular expression includes an unmatchable dollar at offset 5. |
|
||||
| test.py:41:10:41:27 | Str | This regular expression includes an unmatchable dollar at offset 11. |
|
||||
| test.py:41:10:41:27 | Str | This regular expression includes an unmatchable dollar at offset 13. |
|
||||
| test.py:42:10:42:25 | Str | This regular expression includes an unmatchable dollar at offset 3. |
|
||||
| test.py:79:12:79:26 | Str | This regular expression includes an unmatchable dollar at offset 3. |
|
||||
|
||||
@@ -30,15 +30,16 @@ re.compile(b"abc$ ")
|
||||
re.compile(b"abc$ (?s)")
|
||||
re.compile(b"\[$] ")
|
||||
|
||||
#Likely false positives for unmatchable dollar
|
||||
re.compile(b"[$] ")
|
||||
re.compile(b"\$ ")
|
||||
re.compile(b"abc$(?m)")
|
||||
re.compile(b"abc$()")
|
||||
re.compile(b"((a$)|b)*")
|
||||
re.compile(b"((a$)|b){4}")
|
||||
re.compile(b"((a$).*)")
|
||||
|
||||
#Not unmatchable dollar
|
||||
re.match(b"[$] ", b"$ ")
|
||||
re.match(b"\$ ", b"$ ")
|
||||
re.match(b"abc$(?m)", b"abc")
|
||||
re.match(b"abc$()", b"abc")
|
||||
re.match(b"((a$)|b)*", b"bba")
|
||||
re.match(b"((a$)|b){4}", b"bbba")
|
||||
re.match(b"((a$).*)", b"a")
|
||||
re.match("(\Aab$|\Aba$)$\Z", "ab")
|
||||
re.match(b"((a$\Z)|b){4}", b"bbba")
|
||||
|
||||
#Duplicate character in set
|
||||
re.compile(b"[AA]")
|
||||
|
||||
Reference in New Issue
Block a user