code: private static function removeUtf8Modifier($pattern)
      {
          if (\is_array($pattern)) {
              return array_map(__METHOD__, $pattern);
          }
  
          if ('' === $pattern) {
              return '';
          }
  
          $delimiter = substr($pattern, 0, 1);
  
          $endDelimiterPosition = strrpos($pattern, $delimiter);
  
          return substr($pattern, 0, $endDelimiterPosition).str_replace('u', '', substr($pattern, $endDelimiterPosition));
      }
docs: @param string|string[] $pattern
  
  @return string|string[]