File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -287,12 +287,12 @@ Regex
287
287
-----
288
288
``` python
289
289
import re
290
- < str > = re.sub(' <regex>' , new, text, count = 0 ) # Substitutes all occurrences.
291
- < list > = re.findall(' <regex>' , text) # Returns all occurrences.
292
- < list > = re.split(' <regex>' , text, maxsplit = 0 ) # Use brackets in regex to keep the matches.
293
- < Match> = re.search(' <regex>' , text) # Searches for first occurrence of pattern.
294
- < Match> = re.match(' <regex>' , text) # Searches only at the beginning of the text.
295
- < iter > = re.finditer(' <regex>' , text) # Returns all occurrences as match objects.
290
+ < str > = re.sub(< regex> , new, text, count = 0 ) # Substitutes all occurrences.
291
+ < list > = re.findall(< regex> , text) # Returns all occurrences.
292
+ < list > = re.split(< regex> , text, maxsplit = 0 ) # Use brackets in regex to keep the matches.
293
+ < Match> = re.search(< regex> , text) # Searches for first occurrence of pattern.
294
+ < Match> = re.match(< regex> , text) # Searches only at the beginning of the text.
295
+ < iter > = re.finditer(< regex> , text) # Returns all occurrences as match objects.
296
296
```
297
297
298
298
* ** Parameter ` 'flags=re.IGNORECASE' ` can be used with all functions.**
You can’t perform that action at this time.
0 commit comments