Skip to content

Instantly share code, notes, and snippets.

@nilbus
Created February 10, 2010 01:38
Show Gist options
  • Save nilbus/299918 to your computer and use it in GitHub Desktop.
Save nilbus/299918 to your computer and use it in GitHub Desktop.
// returns true if mattern appears in string
public static boolean iregex(String pattern, String string) {
Pattern p = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(string);
return m.find();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment