# How to filter log in kibana

**URL:** <https://discuss.elastic.co/t/how-to-filter-log-in-kibana/291981>\
**Category:** Kibana\
**Created:** [December 15, 2021, 1:17pm UTC](https://discuss.elastic.co/t/how-to-filter-log-in-kibana/291981 "2021-12-15T13:17:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roccof97](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roccof97/32/97628_2.png) [@Roccof97](https://discuss.elastic.co/u/Roccof97)\
**Post date:** [December 15, 2021, 1:17pm UTC](https://discuss.elastic.co/t/how-to-filter-log-in-kibana/291981/1 "2021-12-15T13:17:01Z")

</div>

Hi everyone,

my goal is to filter this string "sudo egrep -i -r '${jndi:(ldap[s]?|rmi|dns):/[^\n]+' /var/log" in the message of my logs  
This is related to the log4j issue.

Thanks in advance to those who help me.

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [December 15, 2021, 4:21pm UTC](https://discuss.elastic.co/t/how-to-filter-log-in-kibana/291981/2 "2021-12-15T16:21:32Z")

</div>

Hi

You can do this in Discover by using the Lucene query syntax in the query bar (Not available using KQL) which allows you to use regular expressions like this:

> **[Regular expression syntax | Elasticsearch Guide \[7.16\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/regexp-syntax.html)**

Best,  
Matthias

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 12, 2022, 4:22pm UTC](https://discuss.elastic.co/t/how-to-filter-log-in-kibana/291981/3 "2022-01-12T16:22:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
