Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 865
HGPB Avatar asked Oct 25 '25 20:10

HGPB


1 Answers

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.

like image 126
Jerry Avatar answered Oct 28 '25 18:10

Jerry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!