View Problem

Check if a string matches with groups

Display "two" if "one two three" matches /one (.*) three/
DiskEdit
perl
print $1 if "one two three"=~/^one (.*) three$/
DiskEdit
erlang 12B3+
case re:run("one two three", "one (.*) three", [{capture, [1], list}]) of {match, Res} -> hd(Res) end.

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