Finding What is Not There in Eclipse

In my current project there is a need to add some parameters to portlet definition files. The first pass through we only updated the ones we knew needed the update. As is often the case, what we knew then and what we know now changed, and it became a better approach to simply add the values to all of the portlet definition files. Rather than sorting through one by one to find which had not been updated, I did a search and found a stackoverflow thread about how to do these searches in Eclipse. The thread included the following example of a regular expression for finding files that do not include a particular value:

(?s)A((?!YourSearchText).)*Z

For those who like pictures, below is how the search box is used with regex to find files missing the string:

EclipseRegExSearchExample

Facebooktwitterredditlinkedinmail
© Scott S. Nelson

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.