Emulate python-3.4 re.fullmatch().
(regex, string, flags=0)
| 14 | |
| 15 | # back-port of fullmatch from Py3.4+ |
| 16 | def fullmatch(regex, string, flags=0): |
| 17 | """Emulate python-3.4 re.fullmatch().""" |
| 18 | if "pattern" in dir(regex): |
| 19 | regex_string = regex.pattern |
| 20 | else: |
| 21 | regex_string = regex |
| 22 | return re.match("(?:" + regex_string + r")\Z", string, flags=flags) |
| 23 | |
| 24 | |
| 25 | def to_non_numpy_type(np, v): |
no outgoing calls
no test coverage detected