

Task

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


str = "I am a string"
p "Ends with 'string'" if str =~ /string$/
p "Does not start with 'You'" unless str =~ /^You/