简体   繁体   English

一种 glob 模式以匹配除一个文件夹之外的任何内容(文件或文件夹)

[英]A glob pattern to to match anything(file or folder) except one folder

I have this glob pattern and been trying to exclude the i18n folder from it:我有这个 glob 模式并试图从中排除i18n文件夹:

dist/assets/!(i18n)/**

Basically, I want to match everything inside the assets folder except the i18n folder.基本上,我想匹配assets文件夹中除i18n文件夹之外的所有内容。 The i18n folder contains a few .json files. i18n文件夹包含一些.json文件。

This worked eventually:这最终奏效了:

dist/assets/**/!(ar.json|en.json)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM