Browse Source

Path

pull/52/head
Jure Šorn 5 years ago
parent
commit
ba71d43753
2 changed files with 6 additions and 4 deletions
  1. 5
      README.md
  2. 5
      index.html

5
README.md

@ -362,7 +362,8 @@ import re
* **Search() and match() return None if they can't find a match.**
* **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.DOTALL'` makes dot also accept newline.**
* **Argument `'flags=re.DOTALL'` makes dot also match the newline.**
* **Only character that is considered a line separator is `'\n'`.**
* **Use `r'\1'` or `'\\1'` for backreference.**
* **Add `'?'` after an operator to make it non-greedy.**
@ -1579,7 +1580,7 @@ from glob import glob
```python
<str> = getcwd() # Returns the current working directory.
<str> = path.join(<path>, ...) # Joins two or more pathname components.
<str> = path.abspath(<path>) # Return an absolute path.
<str> = path.abspath(<path>) # Returns an absolute path.
```
```python

5
index.html

@ -469,7 +469,8 @@ to_exclusive = &lt;range&gt;.stop
<li><strong>Search() and match() return None if they can't find a match.</strong></li>
<li><strong>Argument <code class="python hljs"><span class="hljs-string">'flags=re.IGNORECASE'</span></code> can be used with all functions.</strong></li>
<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>
<li><strong>Argument <code class="python hljs"><span class="hljs-string">'flags=re.DOTALL'</span></code> makes dot also accept newline.</strong></li>
<li><strong>Argument <code class="python hljs"><span class="hljs-string">'flags=re.DOTALL'</span></code> makes dot also match the newline.</strong></li>
<li><strong>Only character that is considered a line separator is <code class="python hljs"><span class="hljs-string">'\n'</span></code>.</strong></li>
<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>
<li><strong>Add <code class="python hljs"><span class="hljs-string">'?'</span></code> after an operator to make it non-greedy.</strong></li>
</ul>
@ -1459,7 +1460,7 @@ value = args.&lt;name&gt;
<pre><code class="python language-python hljs">&lt;str&gt; = getcwd() <span class="hljs-comment"># Returns the current working directory.</span>
&lt;str&gt; = path.join(&lt;path&gt;, ...) <span class="hljs-comment"># Joins two or more pathname components.</span>
&lt;str&gt; = path.abspath(&lt;path&gt;) <span class="hljs-comment"># Return an absolute path.</span>
&lt;str&gt; = path.abspath(&lt;path&gt;) <span class="hljs-comment"># Returns an absolute path.</span>
</code></pre>
<pre><code class="python language-python hljs">&lt;str&gt; = path.basename(&lt;path&gt;) <span class="hljs-comment"># Returns final component.</span>
&lt;str&gt; = path.dirname(&lt;path&gt;) <span class="hljs-comment"># Returns path without final component.</span>

Loading…
Cancel
Save