Skip to content

Commit 5607310

Browse files
committed
Regex
1 parent 603ad85 commit 5607310

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ String
335335
### Property Methods
336336
```text
337337
+---------------+----------+----------+----------+----------+----------+
338-
| | [ !#$%…] | [a-zA-Z] | [¼½¾] | [²³¹…] | [0-9] |
338+
| | [ !#$%…] | [a-zA-Z] | [¼½¾] | [²³¹] | [0-9] |
339339
+---------------+----------+----------+----------+----------+----------+
340340
| isprintable() | yes | yes | yes | yes | yes |
341341
| isalnum() | | yes | yes | yes | yes |
@@ -380,8 +380,8 @@ import re
380380
* **Use capital letter for negation.**
381381
```python
382382
'\d' == '[0-9]' # Matches any digit.
383-
'\s' == '[ \t\n\r\f\v…]' # Matches any whitespace.
384383
'\w' == '[a-zA-Z0-9_]' # Matches any alphanumeric.
384+
'\s' == '[ \t\n\r\f\v]' # Matches any whitespace.
385385
```
386386

387387

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@
443443
<li><strong>Also: <code class="python hljs"><span class="hljs-string">'lower()'</span></code>, <code class="python hljs"><span class="hljs-string">'upper()'</span></code>, <code class="python hljs"><span class="hljs-string">'capitalize()'</span></code> and <code class="python hljs"><span class="hljs-string">'title()'</span></code>.</strong></li>
444444
</ul>
445445
<div><h3 id="propertymethods">Property Methods</h3><pre><code class="text language-text">+---------------+----------+----------+----------+----------+----------+
446-
| | [ !#$%…] | [a-zA-Z] | [¼½¾] | [²³¹…] | [0-9] |
446+
| | [ !#$%…] | [a-zA-Z] | [¼½¾] | [²³¹] | [0-9] |
447447
+---------------+----------+----------+----------+----------+----------+
448448
| isprintable() | yes | yes | yes | yes | yes |
449449
| isalnum() | | yes | yes | yes | yes |
@@ -484,8 +484,8 @@
484484
<li><strong>By default digits, whitespaces and alphanumerics from all alphabets are matched, unless <code class="python hljs"><span class="hljs-string">'flags=re.ASCII'</span></code> argument is used.</strong></li>
485485
<li><strong>Use capital letter for negation.</strong></li>
486486
</ul><pre><code class="python language-python hljs"><span class="hljs-string">'\d'</span> == <span class="hljs-string">'[0-9]'</span> <span class="hljs-comment"># Matches any digit.</span>
487-
<span class="hljs-string">'\s'</span> == <span class="hljs-string">'[ \t\n\r\f\v…]'</span> <span class="hljs-comment"># Matches any whitespace.</span>
488487
<span class="hljs-string">'\w'</span> == <span class="hljs-string">'[a-zA-Z0-9_]'</span> <span class="hljs-comment"># Matches any alphanumeric.</span>
488+
<span class="hljs-string">'\s'</span> == <span class="hljs-string">'[ \t\n\r\f\v]'</span> <span class="hljs-comment"># Matches any whitespace.</span>
489489
</code></pre></div>
490490

491491

web/script_2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ const DIAGRAM_12_A =
238238

239239
const DIAGRAM_12_B =
240240
'┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n' +
241-
'┃ │ [ !#$%…] │ [a-zA-Z] │ [¼½¾] │ [²³¹…] │ [0-9] ┃\n' +
241+
'┃ │ [ !#$%…] │ [a-zA-Z] │ [¼½¾] │ [²³¹] │ [0-9] ┃\n' +
242242
'┠───────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\n' +
243243
'┃ isprintable() │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
244244
'┃ isalnum() │ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +

0 commit comments

Comments
 (0)