# Remove Spaces and text between these \<\> brackets

**URL:** <https://discuss.elastic.co/t/remove-spaces-and-text-between-these-brackets/309683>\
**Category:** Elasticsearch\
**Created:** [July 14, 2022, 7:52pm UTC](https://discuss.elastic.co/t/remove-spaces-and-text-between-these-brackets/309683 "2022-07-14T19:52:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![errupeshmca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/errupeshmca/32/78285_2.png) [@errupeshmca](https://discuss.elastic.co/u/errupeshmca)\
**Post date:** [July 14, 2022, 7:52pm UTC](https://discuss.elastic.co/t/remove-spaces-and-text-between-these-brackets/309683/1 "2022-07-14T19:52:11Z")

</div>

Hi , I am new to the elasticsearch i have to filter the logs removing larges spaces and less than, greater than signs around the text,

```auto
<NHTR> <HNANE: main > <INFO > <GHMonitorDaemon > < GHMonitorDaemon.java:203 > /* Fri Jul 08 2022 15:37:25.0103 */ Initializing GHMonitor Version 7.1.10 202002152305

```

below config file (i didn't complete because it's not working)

```auto
filter {
    grok {
        match => ["message" => "\<%{WORD:name}\> \<%{WORD:dname}\: %{WORD:logname}"]
    }

}

```

Parsed Output

```auto
{
          "host" => "kmaster",
      "@version" => "1",
       "message" => "<NHTR> <HNANE: main > <INFO > <ProcessController > < ProcessController.java:96 > /* Fri Jul 08 2022 15:37:27.0842 */ Initializing ProcessController, to start and monitor all the processes listed in ghmonitor configuration file.\r",
    "@timestamp" => 2022-07-14T19:48:54.032Z,
          "path" => "/home/vagrant/elk-install/ELK-Logs/logs-todo/logs-itsm-ar/armonitor.log"
}

```

---

<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:** [August 11, 2022, 7:52pm UTC](https://discuss.elastic.co/t/remove-spaces-and-text-between-these-brackets/309683/2 "2022-08-11T19:52:46Z")

</div>

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