I’m using the following regex find command in OS X terminal to find a whole load of files that have 8 digit file names followed by either a .jpg, .gif, .png or .eps extension. The following produces no results even though I’ve told OS X/BSD find to use modern regex
find -E ./ -iregex '\d{8}'
Using http://rubular.com/ (http://rubular.com/r/YMz3J8Qlgh) shows that the regex pattern produces the expected results and OS X produces the results when typing
find . -iname '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].*'
But this seems a little long winded.
These commands works on OSX
this command matches 12345678.jpg , not 123456789.jpg
this command matches 12345678.jpg and 123456789.jpg
equal the folder path or the subFolder path