find . -maxdepth 1 -type d | while read; do if [[ "$REPLY" =~ "^./(.*-.*)$" ]]; then find "${BASH_REMATCH[1]}" -mindepth 1 -maxdepth 1 -type d fi done