Splunk Search

how to remove last character of a field value from the search results

muthvin
New Member

how to remove last character of a field value from the search results

0 Karma
1 Solution

jmallorquin
Builder

Hi,

With rex you can do this

| rex field=yourfield "(?<no_last>.*)."

Hope help you

View solution in original post

0 Karma

jmallorquin
Builder

Hi,

With rex you can do this

| rex field=yourfield "(?<no_last>.*)."

Hope help you

0 Karma

muthvin
New Member

thx for your reply jmallorquin, but i need more clarity on your suggestion .
Also i tried |eval field=rtrim(yourfield,"****") which helped me.

It will be great if you help me in understanding your view mentioned above.

  • Muthu
0 Karma

jmallorquin
Builder

Sure,

With my command i match all the characters less the last one in a new field called no_last

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...