Decode a BSON regex to bson.regex.Regex or a python pattern object.
(
data: Any, view: Any, position: int, dummy0: Any, opts: CodecOptions[Any], dummy1: Any
)
| 459 | |
| 460 | |
| 461 | def _get_regex( |
| 462 | data: Any, view: Any, position: int, dummy0: Any, opts: CodecOptions[Any], dummy1: Any |
| 463 | ) -> Tuple[Regex[Any], int]: |
| 464 | """Decode a BSON regex to bson.regex.Regex or a python pattern object.""" |
| 465 | pattern, position = _get_c_string(data, view, position, opts) |
| 466 | bson_flags, position = _get_c_string(data, view, position, opts) |
| 467 | bson_re = Regex(pattern, bson_flags) |
| 468 | return bson_re, position |
| 469 | |
| 470 | |
| 471 | def _get_ref( |
nothing calls this directly
no test coverage detected