Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
irb(main):001:0> RUBY_DESCRIPTION
=> "ruby 2.0.0dev (2012-12-08 trunk 38268) [x86_64-darwin12.2.1]"
irb(main):002:0> /(?i:[\W])/.match 's'
=> #<MatchData "s">
irb(main):003:0> /(?i:[\w])/.match 's'
=> #<MatchData "s">
irb(main):004:0> /(?i:\W)/.match 's'
=> nil
irb(main):005:0> /(?i:\w)/.match 's'
=> #<MatchData "s">
irb(main):006:0> /[\W]/.match 's'
=> nil
irb(main):007:0> /[\w]/.match 's'
=> #<MatchData "s">
irb(main):008:0> /(?i:[\W])/.match 'r'
=> nil
irb(main):009:0> /(?i:[\w])/.match 'r'
=> #<MatchData "r">
irb(main):010:0> /(?i:[\W])/.match 't'
=> nil
irb(main):011:0> /(?i:[\w])/.match 't'
=> #<MatchData "t">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.