#!/usr/bin/env python

import re

r = re.compile(r'.*[^(\.h)|(\.cpp)]$')

for e in [".hello", ".bar", "lol"]:
    assert r.match(e) is not None

for e in [".cpp", ".h"]:
    assert r.match(e) is None
