I have this command:
find reports/ -type f -mtime +90 -regex ".*\.\(csv\|sql\|txt\|xls\|zip\)"
And I need to strengthen it so that the part before the file extension matches the YYYY/MM/DD pattern, for example:
reports/2010/10/10/23.txt reports/2010/10/10/23.xls reports/2010/10/10/26.csv reports/2010/10/10/26.sql reports/2010/10/10/26.txt reports/2010/10/10/26.xls reports/2010/10/10/27.csv
But I can't get any permutation \d and parens triggered to work.
UPDATE: this is what worked for me based on the answer below:
find reports/ -type f -mtime +90 -regex "reports/201[01]/\([1-9]\|1[012]\)/\([1-9]\|[12][0-9]\|3[01]\)/.*\.\(csv\|sql\|txt\|xls\|zip\)"
Teflon ted
source share