# Need Extractor which removes ending dot from string (if present) 

**URL:** <https://community.graylog.org/t/need-extractor-which-removes-ending-dot-from-string-if-present/30755>\
**Category:** New to Graylog Community? READ-ME FIRST Guides\
**Created:** [November 22, 2023, 7:47pm UTC](https://community.graylog.org/t/need-extractor-which-removes-ending-dot-from-string-if-present/30755 "2023-11-22T19:47:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![louis](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@louis](https://community.graylog.org/u/louis)\
**Post date:** [November 22, 2023, 7:47pm UTC](https://community.graylog.org/t/need-extractor-which-removes-ending-dot-from-string-if-present/30755/1 "2023-11-22T19:47:46Z")

</div>

I noticed that a lot / all extracted urls are ending with a dot ([xyz.com](http://xyz.com).)  
That is of course not correct, so I want to remove that final dot.

The situation is as follows. I defined a couple of extractors which put data in a field named “url\_or\_whois”.

At the end of the extractor “que” I intend to place an extra extractor which should behave like this:

- run if field “url\_or\_whois” is populated and the content ends with a dot
- in that case the extractor should extract every thing before the dot at the end
- and place the result in “url\_or\_whois”

After this action the “url\_or\_whois” field should contain the same content, however without the dot at the string end

I hope this can be done which a combination of

- regex (to check if the field content ends on “.”)
- “regex or grok” to perform the action (I think the only option is one of those two)

I just do not know how ☹

I hope someone have a solution
