From 31ad40fd27c96ef3186fe83152e33fc1af91f39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 29 Jan 2019 19:00:17 +0100 Subject: [PATCH] Regex --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1a6bdbb..790c7c0 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,11 @@ String Regex ----- +* **Parameter `'flags=re.IGNORECASE'` can be used with all functions.** +* **Parameter `'flags=re.DOTALL'` makes dot also accept newline.** +* **Use `r'\1'` or `'\\\\1'` for backreference.** +* **Use `'?'` to make operators non-greedy.** + ```python import re = re.sub(, new, text, count=0) # Substitutes all occurrences. @@ -273,11 +278,6 @@ import re = re.finditer(, text) # Searches for all occurrences of pattern. ``` -* **Parameter `'flags=re.IGNORECASE'` can be used with all functions.** -* **Parameter `'flags=re.DOTALL'` makes dot also accept newline.** -* **Use `r'\1'` or `'\\\\1'` for backreference.** -* **Use `'?'` to make operators non-greedy.** - ### Match Object ```python = .group() # Whole match.