View Problem

Check if a string matches a regular expression

Display "ok" if "Hello" matches /[A-Z][a-z]+/
DiskEdit
ruby
puts "ok" if ("Hello"=~/^[A-Z][a-z]+$/)

Submit a new solution for ruby
There are 24 other solutions in additional languages (clojure, cpp, csharp, erlang ...)