title: how do I escape backslash in Grok custom pattern
body: <p>I have an input as</p>
  
  <pre><code>app\exceptions\SomeException
  </code></pre>
  
  <p>and pattern is</p>
  
  <pre><code>%{EXCEPTION_CLASS:exception}
  </code></pre>
  
  <p>and custom pattern as</p>
  
  <pre><code>{"EXCEPTION_CLASS" : "app\\\\exceptions\\\\SomeException"}
  </code></pre>
  
  <p>In Grok debugger(in Kibana), the output is as </p>
  
  <pre><code>{
    "exception": "app\\exceptions\\SomeException"
  }
  </code></pre>
  
  <p>This is not what I was expecting.
  First, using double backslash doesn't match the input. </p>
  
  <pre><code>{"EXCEPTION_CLASS" : "app\\exceptions\\SomeException"}
  #This gives no output
  </code></pre>
  
  <p>Second, I got output with four backslash, but there were double backslash in it which what I expected was single backslash just like the input.</p>
  
  <p>How does this work and how do I properly escape backslash in Grok pattern?</p>