S
Simon Strandgaard
Why does /[]]/ not raise an exception, when /[]/ does ?
server> ruby -e "p /[]]/.match('a]e').to_a"
-e:1: warning: character class has `]' without escape
["]"]
server> ruby -e "p /[]/.match('a]e').to_a"
-e:1: invalid regular expression; empty character class: /[]/
server>
server> ruby -e "p /[]]/.match('a]e').to_a"
-e:1: warning: character class has `]' without escape
["]"]
server> ruby -e "p /[]/.match('a]e').to_a"
-e:1: invalid regular expression; empty character class: /[]/
server>