Skip to content

Commit d1e8a83

Browse files
committed
Regex
1 parent f4658d1 commit d1e8a83

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,11 @@ import re
368368

369369
### Match Object
370370
```python
371-
<str> = <Match>.group() # Returns whole match. Also group(0).
372-
<str> = <Match>.group(1) # Returns part in first bracket.
371+
<str> = <Match>.group() # Returns the whole match. Also group(0).
372+
<str> = <Match>.group(1) # Returns part in the first bracket.
373373
<tuple> = <Match>.groups() # Returns all bracketed parts.
374-
<int> = <Match>.start() # Returns start index of a match.
375-
<int> = <Match>.end() # Returns exclusive end index of a match.
374+
<int> = <Match>.start() # Returns start index of the match.
375+
<int> = <Match>.end() # Returns exclusive end index of the match.
376376
```
377377

378378
### Special Sequences

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,11 @@
473473
<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>
474474
<li><strong>Add <code class="python hljs"><span class="hljs-string">'?'</span></code> after an operator to make it non-greedy.</strong></li>
475475
</ul>
476-
<div><h3 id="matchobject">Match Object</h3><pre><code class="python language-python hljs">&lt;str&gt; = &lt;Match&gt;.group() <span class="hljs-comment"># Returns whole match. Also group(0).</span>
477-
&lt;str&gt; = &lt;Match&gt;.group(<span class="hljs-number">1</span>) <span class="hljs-comment"># Returns part in first bracket.</span>
476+
<div><h3 id="matchobject">Match Object</h3><pre><code class="python language-python hljs">&lt;str&gt; = &lt;Match&gt;.group() <span class="hljs-comment"># Returns the whole match. Also group(0).</span>
477+
&lt;str&gt; = &lt;Match&gt;.group(<span class="hljs-number">1</span>) <span class="hljs-comment"># Returns part in the first bracket.</span>
478478
&lt;tuple&gt; = &lt;Match&gt;.groups() <span class="hljs-comment"># Returns all bracketed parts.</span>
479-
&lt;int&gt; = &lt;Match&gt;.start() <span class="hljs-comment"># Returns start index of a match.</span>
480-
&lt;int&gt; = &lt;Match&gt;.end() <span class="hljs-comment"># Returns exclusive end index of a match.</span>
479+
&lt;int&gt; = &lt;Match&gt;.start() <span class="hljs-comment"># Returns start index of the match.</span>
480+
&lt;int&gt; = &lt;Match&gt;.end() <span class="hljs-comment"># Returns exclusive end index of the match.</span>
481481
</code></pre></div>
482482

483483
<div><h3 id="specialsequences">Special Sequences</h3><ul>

0 commit comments

Comments
 (0)