For example, I want to find a file ends with numbers+.bed, it works if used this:
find . -regex ".*/[0-9]+\.bed"
As I know, find uses emacs regex style by default, so I found this page: http://www.gnu.org/software/emacs/manual/html_node/elisp/Char-Classes.html#Char-Classes and then try to use [[:digit:]] to replace [0-9], but none of these commands works for me.
find . -regex ".*/[:digit:]\.bed"
Or
find . -regex ".*/[[:digit:]]\.bed"
Does anybody have any ideas about where I was wrong in the command?
Thanks!
You need to use a different regex type. For example, try: