129

I found the following code example for Java on RosettaCode:
public static boolean prime(int n) {
return !new String(new char[n]).matches(".?|(..+?)\\1+");
}
I don't know Java in particular but understand all aspects of this snippet except for the regex itself
I have basic to basic-advanced ...