You can use negative lookbehind:
String regex = "(?<!GoodClass\\.)\\bNiceMethod\\b";
1
solved Regular expression to fetch lines evaluating only one part of a string, java
You can use negative lookbehind:
String regex = "(?<!GoodClass\\.)\\bNiceMethod\\b";
1
solved Regular expression to fetch lines evaluating only one part of a string, java