

Task

   match a string against a regular expression
   substitute part of a string using a regular expression


 
line = "My name is Inigo Montoya."
 
for [first, last] = line =~ %r/my name is (\w+) (\w+)/ig
{
   println["First name is: $first"]
   println["Last name is: $last"]
} 
 