Optionally use regex or glob

closes #6