Using eachDirMatch to skip .svn folders

Posted by algernon on Stack Overflow See other posts from Stack Overflow or by algernon
Published on 2010-04-26T17:40:46Z Indexed on 2010/04/26 17:43 UTC
Read the original article Hit count: 142

Filed under:

I'm writing a program which needs to traverse a set of directories. Tried to use the following code:

file.eachDirMatch(/.*[^.svn]/){ //some code here }

But that ended up match none of my directories. I realize this boils down figuring out the right regex hang head in shame but even after revisiting some Java Regular Expression documentation I thought this should work.

© Stack Overflow or respective owner

Related posts about groovy