Skip to content

Commit 0df8f2e

Browse files
committed
Regex
1 parent 6ce91f4 commit 0df8f2e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ import re
353353
```
354354

355355
* **Argument `'flags=re.IGNORECASE'` can be used with all functions.**
356+
* **Argument `'flags=re.MULTILINE'` makes `'^'` and `'$'` match the start/end of each line.**
356357
* **Argument `'flags=re.DOTALL'` makes dot also accept newline.**
357358
* **Use `r'\1'` or `'\\1'` for backreference.**
358359
* **Use `'?'` to make an operator non-greedy.**
@@ -931,7 +932,7 @@ class <name>:
931932
return cls.__name__
932933
```
933934
* **Return value of repr() should be unambiguous and of str() readable.**
934-
* **If only repr() is defined, it will also be used for str().**
935+
* **If only repr() is defined, it will be also used for str().**
935936

936937
#### Str() use cases:
937938
```python

index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ <h2 id="regex"><a href="#regex" name="regex">#</a>Regex</h2>
446446
</code></pre>
447447
<ul>
448448
<li><strong>Argument <code class="python hljs"><span class="hljs-string">'flags=re.IGNORECASE'</span></code> can be used with all functions.</strong></li>
449+
<li><strong>Argument <code class="python hljs"><span class="hljs-string">'flags=re.MULTILINE'</span></code> makes <code class="python hljs"><span class="hljs-string">'^'</span></code> and <code class="python hljs"><span class="hljs-string">'$'</span></code> match the start/end of each line.</strong></li>
449450
<li><strong>Argument <code class="python hljs"><span class="hljs-string">'flags=re.DOTALL'</span></code> makes dot also accept newline.</strong></li>
450451
<li><strong>Use <code class="python hljs"><span class="hljs-string">r'\1'</span></code> or <code class="python hljs"><span class="hljs-string">'\\1'</span></code> for backreference.</strong></li>
451452
<li><strong>Use <code class="python hljs"><span class="hljs-string">'?'</span></code> to make an operator non-greedy.</strong></li>
@@ -889,7 +890,7 @@ <h2 id="class"><a href="#class" name="class">#</a>Class</h2>
889890
</code></pre>
890891
<ul>
891892
<li><strong>Return value of repr() should be unambiguous and of str() readable.</strong></li>
892-
<li><strong>If only repr() is defined, it will also be used for str().</strong></li>
893+
<li><strong>If only repr() is defined, it will be also used for str().</strong></li>
893894
</ul>
894895
<h4 id="strusecases">Str() use cases:</h4>
895896
<pre><code class="python language-python hljs">print(&lt;el&gt;)

0 commit comments

Comments
 (0)