Skip to content

Instantly share code, notes, and snippets.

@mbadran
Created April 16, 2010 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbadran/368116 to your computer and use it in GitHub Desktop.
Save mbadran/368116 to your computer and use it in GitHub Desktop.
case insensitive matches()
testString.matches("(?i)^[a-b]*$");
// (?i) toggles case insensitive matching
// also works for m, s, and x modes
// http://www.regular-expressions.info/modifiers.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment