find utility is powerful, but I'd need some additional features.
-regex search treats each filename (or dirname) as a string and applys given regex only at the beginning of name. like python's
re.match(..). if it doesn't produce a match, it won't be found.
for example If i want to find files containing 'log', (I know there are simpler ways to find files whose filename contains 'log' without regex, but it's only for an example)
$ find -regex 'log' (nothing) $ find -regex '\./.*log.*$' ./log9 ./log7 ./log5 ./log0 ./log2 ./log4 ./log6 ./log8 ./log3 ./log1
so, is there a way to make
-regex that uses regex on filenames, like
grep or python's
re.search(..) - not only at the start of a string, but anywhere where it can match?