gwkokab.analysis.utils.regex ============================ .. py:module:: gwkokab.analysis.utils.regex Functions --------- .. autoapisummary:: gwkokab.analysis.utils.regex.match_all gwkokab.analysis.utils.regex.matches_regex Module Contents --------------- .. py:function:: match_all(strings: Sequence[str], pattern_dict_with_val: Dict[str, str | int | float | None]) -> Dict[str, int | float | None] Match all strings in a list with a dictionary of regex patterns. :param strings: list of strings to match :type strings: List[str] :param pattern_dict_with_val: dictionary of regex patterns with values :type pattern_dict_with_val: Dict[str, str | int | float | None] :returns: dictionary of matched patterns with values :rtype: Dict[str, int | float | None] .. py:function:: matches_regex(pattern: str, string: str) -> bool Check if a string matches a regex pattern. :param pattern: regex pattern to match :type pattern: str :param string: string to match :type string: str :returns: :code:`True` if the string matches the pattern, `code`:False: otherwise :rtype: bool