使用 Glob 匹配两个或多个文件

Match two or more files using Glob

我正在尝试弄清楚如何使用此 Glob Online Tester.

来匹配两个或多个文件

匹配 styles/main.cssindex.html 文件的表达式是什么?

images/icons/home.svg
images/icons/phone.svg
images/promo.gif
images/logo.png
styles/main.css
index.html

只是

styles/main.css
index.html

如此处所示:


或者您可以 read the documentation:

  • {} allows for a comma-separated list of "or" expressions

...并使用这个:

{styles/main.css,index.html}