I am trying to do a search in my Eclipse (Java) workspace to find all instances of static variables that are not final.
I tried various regex's but they do not result in any matches. Can someone suggest a regex that will match all lines containing 'static' and not containing 'final', and not ending in a '{'
The last part about not ending with a '{' will eliminate static methods.
An example
public class FlagOffendingStatics {
private static String shouldBeFlagged = "not ok";
private static final String ok = "this is fine";
public static void methodsAreOK() {
}
}
-- Thanks Parag