From 492358c6c2d891a854cb337496ed6bc40a39bb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= <sornjure@gmail.com> Date: Fri, 7 Feb 2020 01:02:15 +0100 Subject: [PATCH] Regex --- README.md | 3 +-- index.html | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 322bac0..6fc45a7 100644 --- a/README.md +++ b/README.md @@ -362,8 +362,7 @@ 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 match the newline.** -* **Only character that is considered a line separator is `'\n'`.** +* **Argument `'flags=re.DOTALL'` makes dot also accept the `'\n'`.** * **Use `r'\1'` or `'\\1'` for backreference.** * **Add `'?'` after an operator to make it non-greedy.** diff --git a/index.html b/index.html index 728d646..997e5b0 100644 --- a/index.html +++ b/index.html @@ -469,8 +469,7 @@ to_exclusive = <range>.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 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>Argument <code class="python hljs"><span class="hljs-string">'flags=re.DOTALL'</span></code> makes dot also accept the <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>