r"""
    regex_parse

    Args:
        regex (str):
        text (str):
        fromstart (bool):

    Returns:
        dict or None:

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_regex import *  # NOQA
        >>> regex = r'(?P<string>\'[^\']*\')'
        >>> text = " 'just' 'a' sentance with 'strings' in it "
        >>> fromstart = False
        >>> result = regex_parse(regex, text, fromstart)['string']
        >>> print(result)

def regex_parse(regex, text, fromstart=True):
    r"""
    regex_parse

    Args:
        regex (str):
        text (str):
        fromstart (bool):

    Returns:
        dict or None:

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_regex import *  # NOQA
        >>> regex = r'(?P<string>\'[^\']*\')'
        >>> text = " 'just' 'a' sentance with 'strings' in it "
        >>> fromstart = False
        >>> result = regex_parse(regex, text, fromstart)['string']
        >>> print(result)

    """
    match = regex_get_match(regex, text, fromstart=fromstart)
    if match is not None:
        parse_dict = match.groupdict()
        return parse_dict
    return None