You can test if a string matches several regular expressions using a switch statement. Example#. case "Ruby is #1!" when /\APython/ puts "Boooo." when /\ARuby/ ...
確定! 回上一頁