import re


def all_collections(db):
    """
    Yield all non-sytem collections in db.
    """
    include_pattern = r'(?!system\.)'
    return (
        db[name]
        for name in db.list_collection_names()
        if re.match(include_pattern, name)
    )