import re


def regex_finder(topics):
    """ Extracts queries, questions and narratives"""
    queries = re.findall("<query>(.*?)<\/query>", topics, flags = re.DOTALL)
    questions = re.findall("<question>(.*?)<\/question>",topics, flags=re.DOTALL)
    narratives = re.findall("<narrative>(.*?)<\/narrative>",topics, flags=re.DOTALL)
    return (queries, questions, narratives)