鍍金池/ 問答/Linux  HTML/ 怎么匹配路徑里不帶 spec 的文件

怎么匹配路徑里不帶 spec 的文件

這樣是匹配帶 spec 的,如果我要匹配所以不以 spec.tsx 結(jié)尾的 tsx 文件,該怎么寫?
find **/*.spec.tsx

不是 webpack 配置。是 styleguidist 配置。

https://react-styleguidist.js...

回答
編輯回答
朕略傻

**/!(*.spec).tsx

2017年3月2日 10:05
編輯回答
離夢(mèng)

/^(.(?!\.spec))+\.tsx$/ 跑路啦!

2018年3月26日 04:51
編輯回答
陌南塵

*/!(.spec).tsx

2018年6月3日 08:24
編輯回答
孤巷

用find吧

find . -name '*.tsx' -not -name '*spec.tsx'
2018年7月9日 20:35
編輯回答
我以為
"!"  非它 不就可以了

試試這個(gè)。
find xx文件下 -type f |grep -v '!/\w*.tsx$/' /etc/group
2017年1月21日 21:19