code: def create_regular_expression(self, regexp):
          
          for parameter in self.situation_context.situation_parameters:
              if parameter.type == 'regexp':
                  return self.add_parameter_value(
                      'reg_exp_situation_parameter_values',
                      **{'parameter_ref': parameter.href,
                         'reg_exp': regexp}) # Treat as raw string
  
          raise CreateElementFailed('The situation does not support a regular '
              'expression as a context value.')
docs: Create a regular expression for this inspection situation
          context. The inspection situation must be using an inspection
          context that supports regex.
          
          :param str regexp: regular expression string
          :raises CreateElementFailed: failed to modify the situation