simplifying dir regex