View Problem

Check if a string contains a match to a regular expression

Display "ok" if "abc 123 @#$" matches /\d+/
ExpandDiskEdit
ruby
puts "ok" if (text=~/\d+/)

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