dict_from_regex_match¶
-
tollan.utils.
dict_from_regex_match
(pattern, input_, type_dispatcher=None)[source]¶ Return a dict from matching
pattern
toinput_
.If match failed, returns None.
- Parameters
- patternstr,
re.Pattern
The regex that matches to the
input_
.- input_str
The string to be matched.
- type_dispatcherdict
This specifies how the matched group values are handled after being extracted.
- patternstr,