def read_pathways_text(pathways_text):
    """Read a pathways string and return it as a list"""

    pathways = []

    # Split by the double forward slashes
    for pathway in pathways_text.split("//"):

        # Remove newline at start and end
        pathway = pathway.strip()

        reactions = []

        # Remove lines beginning with ">"
        for line in pathway.split("\n"):
            if line.startswith(">"):
                continue
            else:
                reactions.append(line)

        # Skip empty pathway
        pathways.append("\n".join(reactions))

    return list(filter(None, pathways))