| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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 | ||
@@ -1004,6 +1020,10 @@ Functions | |||
| 1004 | 1020 | >>> re.findall(r'(\w+)=(\d+)', 'set width=20 and height=10') | |
| 1005 | 1021 | [('width', '20'), ('height', '10')] | |
| 1006 | 1022 | ||
| 1023 | + The expression's behaviour can be modified by specifying a *flags* value. | ||
| 1024 | + Values can be any of the `flags`_ variables, combined using bitwise OR | ||
| 1025 | + (the ``|`` operator). | ||
| 1026 | + | ||
| 1007 | 1027 | .. versionchanged:: 3.7 | |
| 1008 | 1028 | Non-empty matches can now start just after a previous empty match. | |
| 1009 | 1029 | ||
@@ -1015,6 +1035,10 @@ Functions | |||
| 1015 | 1035 | is scanned left-to-right, and matches are returned in the order found. Empty | |
| 1016 | 1036 | matches are included in the result. | |
| 1017 | 1037 | ||
| 1038 | + The expression's behaviour can be modified by specifying a *flags* value. | ||
| 1039 | + Values can be any of the `flags`_ variables, combined using bitwise OR | ||
| 1040 | + (the ``|`` operator). | ||
| 1041 | + | ||
| 1018 | 1042 | .. versionchanged:: 3.7 | |
| 1019 | 1043 | Non-empty matches can now start just after a previous empty match. | |
| 1020 | 1044 | ||
@@ -1070,6 +1094,10 @@ Functions | |||
| 1070 | 1094 | character ``'0'``. The backreference ``\g<0>`` substitutes in the entire | |
| 1071 | 1095 | substring matched by the RE. | |
| 1072 | 1096 | ||
| 1097 | + The expression's behaviour can be modified by specifying a *flags* value. | ||
| 1098 | + Values can be any of the `flags`_ variables, combined using bitwise OR | ||
| 1099 | + (the ``|`` operator). | ||
| 1100 | + | ||
| 1073 | 1101 | .. versionchanged:: 3.1 | |
| 1074 | 1102 | Added the optional flags argument. | |
| 1075 | 1103 | ||
@@ -1102,6 +1130,10 @@ Functions | |||
| 1102 | 1130 | Perform the same operation as :func:`sub`, but return a tuple ``(new_string, | |
| 1103 | 1131 | number_of_subs_made)``. | |
| 1104 | 1132 | ||
| 1133 | + The expression's behaviour can be modified by specifying a *flags* value. | ||
| 1134 | + Values can be any of the `flags`_ variables, combined using bitwise OR | ||
| 1135 | + (the ``|`` operator). | ||
| 1136 | + | ||
| 1105 | 1137 | ||
| 1106 | 1138 | .. function:: escape(pattern) | |
| 1107 | 1139 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments