There is a file named foo.js
in the current folder.
I use find to search :
tigerlei::~/work $ ll foo.js
-rw-rw-r-- 1 tigerlei tigerlei 187 Mar 29 2017 foo.js
tigerlei::~/work $ find . -regex '.*/foo.*.j[R-T]+' -regextype egrep
./foo.js
tigerlei::~/work $ find . -regex '.*/foo.*.j[RST]+' -regextype egrep
tigerlei::~/work $ find . -iregex '.*/foo.*.j[RST]+' -regextype egrep
./foo.js
My system is ubuntu 14.04.
findutil's version is 4.4.2
When I use -regex
, find will use case sensitive mode. But:
[R-T]
will match the lowercase letter 's', and[RST]
will not match 's'.
Question
Why are those outcomes the results of my searches?