I've got a set of files in a directory, all of the format test[0-9][0-9].txt. If I run
find . -regex ".*/(test)[0-9][0-9]\.txt"
then all the files are shown, but if I run
find . -regex ".*/(test)[0-9]{2}\.txt"
then none are shown. What am I doing wrong?!
I've had a search through previous similar questions to this, but can't find a particularly relevant answer
findobviously expects the former by default. You don't say what system you're on - yourfindmight have a switch to turn on extended regexp parsing. On FreeBSD, for example, it's-E-regextype posix-extendedand that doesn't work either