views:

31

answers:

1

I want to ignore .pyc files in the Netbeans project browser.

I think I found a way: TOOLS -> MISCELLANEOUS -> FILES .

Here is a section called: Files ignored by the IDE .

The field there is waiting for a regex describing the file pattern . The default value for that field is:

^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(?!htaccess$).*$

How do I modify this expression in order to (additionally) ignore the .pyc files ?

+3  A: 

Try this :

^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn|.*\.pyc)$|~$|^\.(?!htaccess$).*$

I just added the .*\.pyc in the first group capture.

Colin Hebert
Thanks, it's working. (I've also realized now why regular expressions should be a topic known to every programmer :) )
Andrei Ciobanu
@Andrei: That's why I have a t-shirt that reads `/bb|[^b]{2}/`. The number of people (even with a technical background) that have no idea what this could mean is astonishing.
Tomalak
@Tomalak nice one !
Colin Hebert
@Colin: This is actually in the interesting zone of not readily exposing you as a geek to the uninformed, while being one of the geekiest things around. ;-)
Tomalak