$ irb irb(main):001:0> /(?i:a)bc(?i:d)/ =~ "AbcD" => 0 irb(main):002:0> $~ => #<MatchData "AbcD"> irb(main):003:0> /(?i:a)bc(?i:d)/ =~ "abcd" => 0 irb(main):004:0> /(?i:a)bc(?i:d)/ =~ "Abcd" => 0 irb(main):005:0> /(?i:a)bc(?i:d)/ =~ "abcD" => 0 irb(main):006:0> /(?i:a)bc(?i:d)/ =~ "ABCD" => nil
Tuesday, March 20, 2012
Ignore case partially in Ruby
Try phosphorescence: Ignore case partially in Ruby
No comments:
Post a Comment