Skip to content

Commit 213d011

Browse files
committed
Edit code example in CompiledRegex
Signed-off-by: jorgectf <[email protected]>
1 parent 21e01b8 commit 213d011

File tree

1 file changed

+5
-4
lines changed
  • python/ql/src/experimental/semmle/python/frameworks

1 file changed

+5
-4
lines changed

python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ private module Re {
5252
*
5353
* ```py
5454
* pattern = re.compile(input)
55-
* input.match(s)
55+
* pattern.match(s)
5656
* ```
5757
*
58-
* `patternCall` refers to `re.compile(input)`,
59-
* `regexNode` refers to `input` and
60-
* `this` will refer to `input.match(s)`
58+
* This class will identify that `re.compile` compiles `input` and afterwards
59+
* executes `re`'s `match`. As a result, `this` will refer to `pattern.match(s)`
60+
* and `this.getRegexNode()` will return the node for `input` (`re.compile`'s first argument)
61+
*
6162
*
6263
* See `RegexExecutionMethods`
6364
*

0 commit comments

Comments
 (0)