* **Also: `'isspace()'` checks for `'[ \t\n\r\f\v…]'`.**
* **Also: `'isspace()'` checks for `'[ \t\n\r\f\v\x1c-\x1f\x85…]'`.**
Regex
@ -377,7 +377,7 @@ import re
### Special Sequences
* **By default, decimal characters, alphanumerics and whitespaces from all alphabets are matched unless `'flags=re.ASCII'` argument is used.**
* **As shown below, it restricts special sequence matches to the first 128 characters and prevents `'\s'` from accepting `'[\x1c-\x1f]'`.**
* **As shown below, it restricts special sequence matches to the first 128 characters and prevents `'\s'` from accepting `'[\x1c-\x1f]'` (the so-called separator characters).**
<pre><codeclass="python language-python hljs"><list> = <str>.split() <spanclass="hljs-comment"># Splits on one or more whitespace characters.</span>
<list> = <str>.split(sep=<spanclass="hljs-keyword">None</span>, maxsplit=<spanclass="hljs-number">-1</span>) <spanclass="hljs-comment"># Splits on 'sep' str at most 'maxsplit' times.</span>
<list> = <str>.splitlines(keepends=<spanclass="hljs-keyword">False</span>) <spanclass="hljs-comment"># Splits on [\n\r\f\v\x1c\x1d\x1e\x85…] and \r\n.</span>
<list> = <str>.splitlines(keepends=<spanclass="hljs-keyword">False</span>) <spanclass="hljs-comment"># On [\n\r\f\v\x1c-\x1e\x85\u2028\u2029] and \r\n.</span>
<str> = <str>.join(<coll_of_strings>) <spanclass="hljs-comment"># Joins elements using string as a separator.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><bool> = <sub_str><spanclass="hljs-keyword">in</span><str><spanclass="hljs-comment"># Checks if string contains a substring.</span>
<li><strong>By default, decimal characters, alphanumerics and whitespaces from all alphabets are matched unless <codeclass="python hljs"><spanclass="hljs-string">'flags=re.ASCII'</span></code> argument is used.</strong></li>
<li><strong>As shown below, it restricts special sequence matches to the first 128 characters and prevents <codeclass="python hljs"><spanclass="hljs-string">'\s'</span></code> from accepting <codeclass="python hljs"><spanclass="hljs-string">'[\x1c-\x1f]'</span></code>.</strong></li>
<li><strong>As shown below, it restricts special sequence matches to the first 128 characters and prevents <codeclass="python hljs"><spanclass="hljs-string">'\s'</span></code> from accepting <codeclass="python hljs"><spanclass="hljs-string">'[\x1c-\x1f]'</span></code> (the so-called separator characters).</strong></li>
<li><strong>Use a capital letter for negation.</strong></li>