Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I extend a regular expression to exclude all files in a folder?

In the app.yaml file of my Google App Engine project there is a skip_files section used to exclude files of given types from being uploaded. How do I extend this regular expression to exclude the entire gaeunit directory from being uploaded?

skip_files: |
    ^(.*/)?(
    (app\.yaml)|
    (index\.yaml)|
    (\..*)|
    (.*\.pyc)|
    (.*\.bat)|
    (.*\.psd)|
    (Thumbs.db)|
    (.*\.svn/.*)|
    (.*\.lnk)|
    (.*\.datastore)|
    (_darcs/.*)|
    (nbproject/.*)|
    (.*\.swp)|
    (.*\.log)|
    )$
like image 666
Chris Avatar asked Jan 17 '12 02:01

Chris


People also ask

Can we use regular expression to exclude files?

Sometimes we may find that we want to exclude all files except some specific files from a specific domain: Edit Real Browser Check > Advanced > + Add Excluded File. From the dropdown menu, select 'All Except' and specify the domain or subdomain that you'd like to include.

What is exclude file?

If you exclude a file from a Web Site project (not Web Application), Visual Studio will simply add the . exclude extension to that file. If you remove the extension, that file will be included again. It's up to you if you still need those files or not.


1 Answers

The same way the nbproject and darcs directories are excluded in the above regular expression. Add this line anywhere before the last line:

(gaeunit/.*)|
like image 112
Nick Johnson Avatar answered Oct 27 '22 23:10

Nick Johnson