mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
support \f and \v in the \s class
This commit is contained in:
@@ -327,8 +327,12 @@ private module CharacterClasses {
|
||||
char = "0123456789".charAt(_)
|
||||
or
|
||||
cc.getValue() = "s" and
|
||||
// TODO: also supposed to match \f and vertical tab (\x0B).
|
||||
char = [" ", "\t", "\r", "\n"]
|
||||
(
|
||||
char = [" ", "\t", "\r", "\n", "\\u000c", "\\u000b"]
|
||||
or
|
||||
exists(RegExpConstant constant | constant.getValue().charAt(_) = char) and
|
||||
char.regexpMatch("\\u000b|\\u000c") // \v|\f (vertical tab | form feed)
|
||||
)
|
||||
or
|
||||
cc.getValue() = "w" and
|
||||
char = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_".charAt(_)
|
||||
|
||||
Reference in New Issue
Block a user