# Dissect FILEPATH

**URL:** <https://discuss.elastic.co/t/dissect-filepath/131857>\
**Category:** Logstash\
**Created:** [May 15, 2018, 6:44am UTC](https://discuss.elastic.co/t/dissect-filepath/131857 "2018-05-15T06:44:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frnklnfrancis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frnklnfrancis/32/30967_2.png) [@frnklnfrancis](https://discuss.elastic.co/u/frnklnfrancis)\
**Post date:** [May 15, 2018, 6:44am UTC](https://discuss.elastic.co/t/dissect-filepath/131857/1 "2018-05-15T06:44:31Z")

</div>

Hi,  
I'm pretty new to this, can someone help me to dissect the below file path?

`(_LQ3zMFgBEee5Sr7bPizxug) /com.ti.b.ld.nr.ee.kb.tiontion.jar/src/main/java/com/nk/fiswoa/sb/desk/del/SBBdDkWhLtDO.java`

I only want the last part of the log to be printed, which in this case is: .java

It can sometimes even be .property

Using mutate or dissesct.

Thanks

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 15, 2018, 1:55pm UTC](https://discuss.elastic.co/t/dissect-filepath/131857/2 "2018-05-15T13:55:50Z")

</div>

> [@frnklnfrancis](#):
>
> (\_LQ3zMFgBEee5Sr7bPizxug) /com.ti.b.ld.nr.ee.kb.tiontion.jar/src/main/java/com/nk/fiswoa/sb/desk/del/SBBdDkWhLtDO.java

It could be done using mutate

```
mutate { gsub => ["message", ".*\.", ""] }

```

but if I had to do it I would use grok

```
grok { match => ["message", "\.%{WORD:extension}$"] }

```

---

<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:** [June 12, 2018, 1:55pm UTC](https://discuss.elastic.co/t/dissect-filepath/131857/3 "2018-06-12T13:55:50Z")

</div>

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