

Task

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


V string = ‘This is a string’
 
I re:‘string$’.search(string)
   print(‘Ends with string.’)
 
string = string.replace(re:‘ a ’, ‘ another ’)
print(string)