import re


def get_string( regex, text ):
    """
    Match `regex` in `text` and returns the corresponding group
    (`regex` should be a regex string that contains a captured group)
    """
    match = re.search( regex, text )
    return( match.groups(1)[0] )