import re


def regular_parsing(document, regex):
    """
    Main function to derive all the elements that respects the regex String

    Args:
        document(line): The line of the rdd to parse.
        regex(string): The string that contains the regular expression
    """
    return re.findall(regex, document)