@@ -911,6 +911,10 @@ Functions
911
911
``None `` if no position in the string matches the pattern; note that this is
912
912
different from finding a zero-length match at some point in the string.
913
913
914
+ The expression's behaviour can be modified by specifying a *flags * value.
915
+ Values can be any of the `flags `_ variables, combined using bitwise OR
916
+ (the ``| `` operator).
917
+
914
918
915
919
.. function :: match(pattern, string, flags=0)
916
920
@@ -925,13 +929,21 @@ Functions
925
929
If you want to locate a match anywhere in *string *, use :func: `search `
926
930
instead (see also :ref: `search-vs-match `).
927
931
932
+ The expression's behaviour can be modified by specifying a *flags * value.
933
+ Values can be any of the `flags `_ variables, combined using bitwise OR
934
+ (the ``| `` operator).
935
+
928
936
929
937
.. function :: fullmatch(pattern, string, flags=0)
930
938
931
939
If the whole *string * matches the regular expression *pattern *, return a
932
940
corresponding :class: `~re.Match `. Return ``None `` if the string does not match
933
941
the pattern; note that this is different from a zero-length match.
934
942
943
+ The expression's behaviour can be modified by specifying a *flags * value.
944
+ Values can be any of the `flags `_ variables, combined using bitwise OR
945
+ (the ``| `` operator).
946
+
935
947
.. versionadded :: 3.4
936
948
937
949
@@ -974,6 +986,10 @@ Functions
974
986
>>> re.split(r'(\W*)', '...words...')
975
987
['', '...', '', '', 'w', '', 'o', '', 'r', '', 'd', '', 's', '...', '', '', '']
976
988
989
+ The expression's behaviour can be modified by specifying a *flags * value.
990
+ Values can be any of the `flags `_ variables, combined using bitwise OR
991
+ (the ``| `` operator).
992
+
977
993
.. versionchanged :: 3.1
978
994
Added the optional flags argument.
979
995
@@ -999,6 +1015,10 @@ Functions
999
1015
>>> re.findall(r ' ( \w + ) =( \d + ) ' , ' set width=20 and height=10' )
1000
1016
[('width', '20'), ('height', '10')]
1001
1017
1018
+ The expression's behaviour can be modified by specifying a *flags * value.
1019
+ Values can be any of the `flags `_ variables, combined using bitwise OR
1020
+ (the ``| `` operator).
1021
+
1002
1022
.. versionchanged :: 3.7
1003
1023
Non-empty matches can now start just after a previous empty match.
1004
1024
@@ -1010,6 +1030,10 @@ Functions
1010
1030
is scanned left-to-right, and matches are returned in the order found. Empty
1011
1031
matches are included in the result.
1012
1032
1033
+ The expression's behaviour can be modified by specifying a *flags * value.
1034
+ Values can be any of the `flags `_ variables, combined using bitwise OR
1035
+ (the ``| `` operator).
1036
+
1013
1037
.. versionchanged :: 3.7
1014
1038
Non-empty matches can now start just after a previous empty match.
1015
1039
@@ -1065,6 +1089,10 @@ Functions
1065
1089
character ``'0' ``. The backreference ``\g<0> `` substitutes in the entire
1066
1090
substring matched by the RE.
1067
1091
1092
+ The expression's behaviour can be modified by specifying a *flags * value.
1093
+ Values can be any of the `flags `_ variables, combined using bitwise OR
1094
+ (the ``| `` operator).
1095
+
1068
1096
.. versionchanged :: 3.1
1069
1097
Added the optional flags argument.
1070
1098
@@ -1100,6 +1128,10 @@ Functions
1100
1128
.. versionchanged :: 3.5
1101
1129
Unmatched groups are replaced with an empty string.
1102
1130
1131
+ The expression's behaviour can be modified by specifying a *flags * value.
1132
+ Values can be any of the `flags `_ variables, combined using bitwise OR
1133
+ (the ``| `` operator).
1134
+
1103
1135
1104
1136
.. function :: escape(pattern)
1105
1137
0 commit comments