mkurz
mkurz

Reputation: 2826

Exclude folder except one subfolder via regular expression in Eclipse

I want to add a Resource Filter in Eclipse to exclude a folder named target including all it's files and subfolders except exactly one of this subfolders (target/scala-2.11/classes_managed).

Here is the regex I used for this (including examples for subdirectories): https://regex101.com/r/aQ2qM1/1

In the referenced example it seems the regex works fine. However when I apply this regex in Eclipse it does not work.

What's the correct way to write the regex so it works in Eclipse?

enter image description here

Thank you!

Upvotes: 2

Views: 1008

Answers (1)

amaurs
amaurs

Reputation: 1642

You don't need to get all fancy with regular expressions, you can tell eclipse to "Include only" the Folders with a Name matching:

target/scala-2.11/classes_managed

That will exclude all the files that you wish.

Upvotes: 3

Related Questions