

Task

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


s: "This is a string"
 
if contains? s {/string$/} -> print "yes, it ends with 'string'"
 
replace 's {/[as]/} "x"
 
print s