View Problem

Check if a string contains a match to a regular expression

Display "ok" if "abc 123 @#$" matches /\d+/
DiskEdit
csharp
if(System.Text.RegularExpressions.Regex.IsMatch("abc 123 @#$",@"\d+")){
Console.WriteLine("ok");
}
ExpandDiskEdit
fantom
m := Regex<|\d+|>.matcher("abc 123 @#\$")
if (m.find)
echo("ok")

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