Created
April 16, 2010 07:03
-
-
Save mbadran/368116 to your computer and use it in GitHub Desktop.
case insensitive matches()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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