I want to select some files matching the regular expression. Files, for example:
4510-88aid-50048-INA.txt 4510-88nid-50048-INA.txt xxxx-05xxx-xxxxx-INA.txt
I want all files to match this regex:
.*[\w]{4}-05(?!aid)[\w]{3}-[\w]{5}-INA\.txt
In my opinion, this should be xxxx-05xxx-xxxxx-INA.txt in the case above. Using some tool like RegexTester , everything works fine. Using the bash find -regex doesn't seem to work for me. My question is why?
I can not figure it out, I use:
find /some/path -regex ".*[\w]{4}-05(?!aid)[\w]{3}-[\w]{5}-INA\.txt" -exec echo {} \;
But nothing is printed ... Any ideas?
$ uname -a Linux debmu838 2.6.5-7.321-smp
Tobias source share