Please find the relevant snippets of my code below:
public static final String GREEK = "(alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)";
public static int setHasGreek(String str) {
if (str.toLowerCase().matches(".*\\b"+GREEK+"\\b.*")) return 1;
return 0;
}
The function works fine if the string is just the Greek string (like "gamma", or "delta", etc), however if my string is "NFkappaB" it doesn't work. Could someone offer advice with modifications to the regular expression?
Thank you.