def loads(self, requirements_text):
        lines = re.findall(Requirement.spec_regex,
                           requirements_text,
                           re.MULTILINE)
        for line in lines:
            self.add(Requirement(line[0], "".join(line[1:])))
def _remainingpats(pat, prefix):
    """list of patterns with prefix stripped

    >>> _remainingpats("a/b/c", "")
    ['a/b/c']
    >>> _remainingpats("a/b/c", "a")
    ['b/c']
    >>> _remainingpats("a/b/c", "a/b")
    ['c']
    >>> _remainingpats("a/b/c", "a/b/c")
    []
    >>> _remainingpats("", "")
    []
    """
    if prefix:
        if prefix == pat:
            return []
        else:
            assert pat[len(prefix)] == "/"
            return [pat[len(prefix) + 1 :]]
    else:
        if pat:
            return [pat]
        else:
            return []