[英]Matching all files without an extension, excluding folders [Minimatch]
使用 minimatch 我可以獲得具有以下模式的所有文件.*.*
但它也匹配文件夾並且不再在文件夾中正確匹配。
我在這里測試模式=> http://pthrasher.github.io/minimatch-test/
有以下數據
404
404.html
index
index.html
apples/
apples/a
apples/a.html
apples/b
apples/b.html
oranges/
oranges/c
oranges/c.html
oranges/d
oranges/d.html
預期結果是
404
index
apples/a
apples/b
oranges/c
oranges/d
我目前的解決方案是使用一些模式:
"index"
"404"
"*/.(*.*)"
中沒有擴展名的任何文件
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.