// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class R {
    public static boolean patternMethod(String s) {
        Pattern p = Pattern.compile(".*\\bchris\\b.*");
        Matcher m = p.matcher(s);
        return m.matches();
    }
    public static void main(String[] args) {
        System.out.println(patternMethod("chris"));
        System.out.println(patternMethod("xxxx"));
        System.out.println(patternMethod("xx chris xx"));
        System.out.println(patternMethod("xxchrisxx"));
    }
}
