import re


def extract(regularE : str, init : str, stop : str, string : str):
    """
        regularE:   RE to catch string
        init:       First string to replace
        stop:       Last string to replace
        string:     String to apply the RE
    
    With a regular expression and init and stop to replace, gets a
    substring from string argument and returns it.
    """
    return re.findall(regularE, string)[0]\
             .replace(init, "")\
             .replace(stop, "")