HGPB
HGPB

Reputation: 4376

Eclipse file search regex to include search phrase and exclude particular strings

This is for all you regex hounds.

I need to filter my search in eclipse when I do a file search.

I am looking for aTracker but this brings back hundreds of results so I want to be able to thin the results out.

First off I would like to remove aTracker.sendException and possibly others.

enter image description here

This is a common problem for me so I'm finally posting for a solution so I don't need to go fetch my waders every time a search like this comes along.

Upvotes: 4

Views: 3262

Answers (1)

Jerry
Jerry

Reputation: 71578

To match all aTracker except aTracker.sendException, you can use a negative lookahead if eclipse supports it:

aTracker(?!\.sendException)

You should check the 'Regular expression' box I think.

Upvotes: 3

Related Questions