Skip to content

Commit 31ad40f

Browse files
committed
Regex
1 parent ac7f6a0 commit 31ad40f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ String
263263

264264
Regex
265265
-----
266+
* **Parameter `'flags=re.IGNORECASE'` can be used with all functions.**
267+
* **Parameter `'flags=re.DOTALL'` makes dot also accept newline.**
268+
* **Use `r'\1'` or `'\\\\1'` for backreference.**
269+
* **Use `'?'` to make operators non-greedy.**
270+
266271
```python
267272
import re
268273
<str> = re.sub(<regex>, new, text, count=0) # Substitutes all occurrences.
@@ -273,11 +278,6 @@ import re
273278
<Matches> = re.finditer(<regex>, text) # Searches for all occurrences of pattern.
274279
```
275280

276-
* **Parameter `'flags=re.IGNORECASE'` can be used with all functions.**
277-
* **Parameter `'flags=re.DOTALL'` makes dot also accept newline.**
278-
* **Use `r'\1'` or `'\\\\1'` for backreference.**
279-
* **Use `'?'` to make operators non-greedy.**
280-
281281
### Match Object
282282
```python
283283
<str> = <Match>.group() # Whole match.

0 commit comments

Comments
 (0)