6

I'm using gulp and don't understand the method of the following glob pattern:

'./bower_components/**/!(*.min).css'

It selects all the css files except the min postfixed ones. What would have it compiled to if it had been regex expression?

I understood why './bower_components/**/*!(.min).css' form does not work, but I still don't understand why there is no need to put a asterisk before .css like:

'./bower_components/**/!(*.min)*.css'

The asterisk before the .min reads the chars or could you explain me? How did this pattern find the match before the negation bracket if the star is in the bracket? I image it as a regex. Thank you.

Lajos
  • 2,549
  • 6
  • 31
  • 38

1 Answers1

6

I found this stackoverflow answer related to this question: https://stackoverflow.com/a/36295481/2929207

Applied to this question it would be as follows:

import glob
files = glob.glob('./bower_components/**/[!*.min].css')
Pablo Reyes
  • 3,073
  • 1
  • 20
  • 30