Updated to select directories based on a regular expression