View Problem

Check if a string matches with groups

Display "two" if "one two three" matches /one (.*) three/
ExpandDiskEdit
fantom
m := Regex<|one (.*) three|>.matcher("one two three")
if (m.matches)
echo("${m.group(1)}")

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