Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { public static boolean matches(String s, String[] pattern) { for (int i = 0; i < pattern.length; i++) { if (s.equalsIgnoreCase(pattern[i])) return true; } return false; } }