Last active
March 22, 2020 09:48
-
-
Save bennadel/9751807 to your computer and use it in GitHub Desktop.
Case Insensitive Java Regular Expressions - How Did I Miss That!?!
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
<!--- Set string value. ---> | |
<cfset strText = "Libby is FUNNY" /> | |
<!--- Check case-sensitive match. ---> | |
#strText.Matches( "[a-z ]+" )# | |
<!--- Check case-INsensitive match. ---> | |
#strText.Matches( "(?i)[a-z ]+" )# |
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
<!--- Only allow case-INsensitivity on LIBBY and FUNNY. ---> | |
#strText.Matches( "(?i:libby)[a-z ]+(?i:funny)" )# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment