import re


def market_text_filter(txt):
    """
    This filter is designed for text from teh Agora nad Nucleus data sets. It removes the PGP key from text.

    :param/return txt: String
    """
    pgp_key = re.search(r'BEGIN PGP', txt)
    if pgp_key:
        i1 = pgp_key.start(0)
        txt = txt[0:i1]
    return txt