Skip to content

Commit 01e345c

Browse files
committed
implement RegExpWordBoundary in RegexTreeView
1 parent 8535e6f commit 01e345c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

python/ql/lib/semmle/python/RegexTreeView.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,13 @@ private int toHex(string hex) {
525525
result = 15 and hex = ["f", "F"]
526526
}
527527

528+
/**
529+
* A word boundary, that is, a regular expression term of the form `\b`.
530+
*/
531+
class RegExpWordBoundary extends RegExpEscape {
532+
RegExpWordBoundary() { this.getUnescaped() = "b" }
533+
}
534+
528535
/**
529536
* A character class escape in a regular expression.
530537
* That is, an escaped charachter that denotes multiple characters.

0 commit comments

Comments
 (0)