title: How to remove particular lines from input file if starts with special character in logstash
body: <p>I am trying to remove all the lines starting from &lt; in my input file in logstash. I tried below filter but no success.</p>
  <p>I am new to ELS stack, please pardon if it has already answered.</p>
  <p>Sample Input lines</p>
  <pre><code>Thread #1: t@-1680123584, lwp=22843, ref=0x1b0f8550, session=9F0071A66D89544155D149CCE2453E9A:mx2135649930e123d964:(WebServiceFacade.java:84), ms=0x78714bc0
  &lt;Start Stack Trace&gt;
  &lt;1 - ADK Verbose Trace Entry&gt;
  
    &lt;2 - Launching Program Object&gt;
    
    &lt;3 - ADK Verbose Trace Entry&gt;
  
    &lt;4 - Launching Program Object&gt;
  
  &lt;End Stack Trace&gt;
  Thread #2: t@-1680123584, lwp=22843, ref=0x1b0f8550, session=9F0071A66D89544155D149CCE2453E9A:mx2135649930e123d964:(WebServiceFacade.java:84), ms=0x78714bc0
  &lt;Start Stack Trace&gt;
    &lt;1 - ADK Verbose Trace Entry&gt;
  
    &lt;2 - Launching Program Object&gt;
    
    &lt;3 - ADK Verbose Trace Entry&gt;
  
    &lt;4 - Launching Program Object&gt;
  
  &lt;End Stack Trace&gt;
  </code></pre>
  <p>My current filter is like</p>
  <pre><code>    if[message =~ &quot;^&lt;.*&quot;] {
          drop { }
      }
  </code></pre>
  <p>But somehow it is not working, I am still getting these lines in my output</p>
  <pre><code> &quot;message&quot; =&gt; &quot;Thread #1: t@-1680123584, lwp=22843, ref=0x1b0f8550, session=9F0071A66D89544155D149CCE2453E9A:mx2135649930e123d964:(WebServiceFacade.java:84), ms=0x78714bc0\r\n&lt;Start Stack Trace&gt;\r\n&lt;1 - ADK Verbose Trace Entry&gt;\r\n\r\n  &lt;2 - Launching Program Object&gt;\r\n  \r\n  &lt;3 - ADK Verbose Trace Entry&gt;\r\n\r\n  &lt;4 - Launching Program Object&gt;\r\n\r\n&lt;End Stack Trace&gt;\r&quot;,
  </code></pre>