• Understanding Basic Glob Patterns

    Date Posted: 10-04-2016
    Author: CEBUFREELANCER

    
    
    Glob Patterns
    	* is a wildcard standing for "any string of characters" and *.txt is a glob pattern. 
    	  The other common wildcard is the question mark ( ? ), which stands for one character
    
    
    Example:
    
    	    *.+(js/css)
    			matches all files in the root directory ending in .js or .css
    
    		js/*.js
    			matches files ending in .js in the js directory
    
    		js/**/*.js
    			matches files ending in .js in the js directory and child directories
    
    		!js/main.js
    			excludes main.js file
    
    		
    
    

Advertisement