mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
8 lines
476 B
JavaScript
8 lines
476 B
JavaScript
/[[abc]&&[bcd]]/v; // Valid use of intersection operator, matches b or c
|
|
/abc&&bcd/v; //Valid regex, but no intersection operation: Matches the literal string "abc&&bcd"
|
|
/[abc]&&[bcd]/v; // Valid regex, but incorrect intersection operation:
|
|
// - Matches a single character from [abc]
|
|
// - Then the literal "&&"
|
|
// - Then a single character from [bcd]
|
|
/[[abc]&&[bcd]&&[c]]/v; // Valid use of intersection operator, matches c
|