View Problem

Check if a string contains a match to a regular expression

Display "ok" if "abc 123 @#$" matches /\d+/
ExpandDiskEdit
fsharp
if (Regex.IsMatch("abc 123 @#$", "\\d+")) then printfn "ok"
DiskEdit
clojure
(if (re-find #"\d+" "abc 123 @#$")
(println "ok"))

Submit a new solution for fsharp or clojure
There are 15 other solutions in additional languages (cpp, csharp, erlang, fantom ...)