code: def normalize_pattern(pattern):
      
      if not (pattern.startswith('RE:') or pattern.startswith('!RE:')):
          pattern = _slashes.sub('/', pattern)
      if len(pattern) > 1:
          pattern = pattern.rstrip('/')
      return pattern
docs: Converts backslashes in path patterns to forward slashes.
  
      Doesn't normalize regular expressions - they may contain escapes.