File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed
python/ql/test/query-tests/Expressions/Regex Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 1
1
| test.py:29:12:29:19 | Str | This regular expression includes an unmatchable dollar at offset 3. |
2
2
| test.py:30:12:30:23 | Str | This regular expression includes an unmatchable dollar at offset 3. |
3
3
| test.py:31:12:31:20 | Str | This regular expression includes an unmatchable dollar at offset 2. |
4
- | test.py:78:12:78:26 | Str | This regular expression includes an unmatchable dollar at offset 3. |
4
+ | test.py:41:10:41:27 | Str | This regular expression includes an unmatchable dollar at offset 5. |
5
+ | test.py:41:10:41:27 | Str | This regular expression includes an unmatchable dollar at offset 11. |
6
+ | test.py:41:10:41:27 | Str | This regular expression includes an unmatchable dollar at offset 13. |
7
+ | test.py:42:10:42:25 | Str | This regular expression includes an unmatchable dollar at offset 3. |
8
+ | test.py:79:12:79:26 | Str | This regular expression includes an unmatchable dollar at offset 3. |
Original file line number Diff line number Diff line change 30
30
re .compile (b"abc$ (?s)" )
31
31
re .compile (b"\[$] " )
32
32
33
- #Likely false positives for unmatchable dollar
34
- re .compile (b"[$] " )
35
- re .compile (b"\$ " )
36
- re .compile (b"abc$(?m)" )
37
- re .compile (b"abc$()" )
38
- re .compile (b"((a$)|b)*" )
39
- re .compile (b"((a$)|b){4}" )
40
- re .compile (b"((a$).*)" )
41
-
33
+ #Not unmatchable dollar
34
+ re .match (b"[$] " , b"$ " )
35
+ re .match (b"\$ " , b"$ " )
36
+ re .match (b"abc$(?m)" , b"abc" )
37
+ re .match (b"abc$()" , b"abc" )
38
+ re .match (b"((a$)|b)*" , b"bba" )
39
+ re .match (b"((a$)|b){4}" , b"bbba" )
40
+ re .match (b"((a$).*)" , b"a" )
41
+ re .match ("(\Aab$|\Aba$)$\Z" , "ab" )
42
+ re .match (b"((a$\Z)|b){4}" , b"bbba" )
42
43
43
44
#Duplicate character in set
44
45
re .compile (b"[AA]" )
You can’t perform that action at this time.
0 commit comments