<iter> = re.finditer(r'<regex>', text) # Returns all occurrences as Match objects.
<iter> = re.finditer(r'<regex>', text) # Returns all occurrences as Match objects.
```
```
* **Raw string literals do not interpret escape sequences, thus enabling us to use regex-specific escape sequences that cause SyntaxWarning in normal string literals.**
* **Raw string literals do not interpret escape sequences, thus enabling us to use regex-specific escape sequences that cause SyntaxWarning in normal string literals (since 3.12).**
* **Argument 'new' of re.sub() can be a function that accepts a Match object and returns a str.**
* **Argument 'new' of re.sub() can be a function that accepts a Match object and returns a str.**
* **Argument `'flags=re.IGNORECASE'` can be used with all functions.**
* **Argument `'flags=re.IGNORECASE'` can be used with all functions.**
* **Argument `'flags=re.MULTILINE'` makes `'^'` and `'$'` match the start/end of each line.**
* **Argument `'flags=re.MULTILINE'` makes `'^'` and `'$'` match the start/end of each line.**
<li><strong>Raw string literals do not interpret escape sequences, thus enabling us to use regex-specific escape sequences that cause SyntaxWarning in normal string literals.</strong></li>
<li><strong>Raw string literals do not interpret escape sequences, thus enabling us to use regex-specific escape sequences that cause SyntaxWarning in normal string literals (since 3.12).</strong></li>
<li><strong>Argument 'new' of re.sub() can be a function that accepts a Match object and returns a str.</strong></li>
<li><strong>Argument 'new' of re.sub() can be a function that accepts a Match object and returns a str.</strong></li>
<li><strong>Argument <codeclass="python hljs"><spanclass="hljs-string">'flags=re.IGNORECASE'</span></code> can be used with all functions.</strong></li>
<li><strong>Argument <codeclass="python hljs"><spanclass="hljs-string">'flags=re.IGNORECASE'</span></code> can be used with all functions.</strong></li>
<li><strong>Argument <codeclass="python hljs"><spanclass="hljs-string">'flags=re.MULTILINE'</span></code> makes <codeclass="python hljs"><spanclass="hljs-string">'^'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'$'</span></code> match the start/end of each line.</strong></li>
<li><strong>Argument <codeclass="python hljs"><spanclass="hljs-string">'flags=re.MULTILINE'</span></code> makes <codeclass="python hljs"><spanclass="hljs-string">'^'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'$'</span></code> match the start/end of each line.</strong></li>
@ -864,9 +864,9 @@ Z = dataclasses.make_dataclass(<span class="hljs-string">'Z'</span>, [<span clas
<li><strong>Hints are used by type checkers like <ahref="https://pypi.org/project/mypy/">mypy</a>, data validation libraries such as <ahref="https://pypi.org/project/pydantic/">Pydantic</a> and lately also by <ahref="https://pypi.org/project/Cython/">Cython</a> compiler. However, they are not enforced by CPython interpreter.</strong></li>
<li><strong>Hints are used by type checkers like <ahref="https://pypi.org/project/mypy/">mypy</a>, data validation libraries such as <ahref="https://pypi.org/project/pydantic/">Pydantic</a> and lately also by <ahref="https://pypi.org/project/Cython/">Cython</a> compiler. However, they are not enforced by CPython interpreter.</strong></li>