import java.util.regex.Matcher; import java.util.regex.Pattern; public class NotLookahead { public static void main(String[] args) { String regex = "Tim (?!Bueneman)[A-Z]\\w+"; Pattern p = Pattern.compile(regex); String text = "I can confirm what Tim Bueneman analyst " + "Tim Right is saying — that Amazon.com plans " + " a larger-screen model of its e-book player" + "Tim Singh aimed at students, in the coming " + "Tim Khan also hearing some details about an " + " the base model Tim Yadav told is coming in " + "though Tim Sharma thinks it may be in October"; Matcher m = p.matcher(text); String s = null; while (m.find()) { s = m.group(); System.out.println(s); } } }