Char_filter how to replace backslashes with slashes

"analysis": {
      "char_filter": {
        "replace_bad_slash": {
          "type": "mapping",
          "mappings": [
            "\\ => /"
          ]
        }
      },
      "normalizer": {
        "my_normalizer": {
          "type": "custom",
          "char_filter": ["replace_bad_slash"],
          "filter": ["lowercase"]
        }
      }
    }

When attept to load tempate:

elasticsearch.exceptions.TransportError: TransportError(500, 'runtime_exception', 'Invalid escaped char in [\\]')

you may have to do some double escaping here, like \\\\... also what language are you testing this?

Thank you! Its work.