Created
November 3, 2012 19:25
-
-
Save taq/4008378 to your computer and use it in GitHub Desktop.
Ruby 2.0 Onigmo
This file contains 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
regexp = /^([A-Z])?[a-z]+(?(1)[A-Z]|[a-z])$/ | |
p regexp =~ "foo" #=> 0 | |
p regexp =~ "foO" #=> nil | |
p regexp =~ "FoO" #=> 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment