Splunk Search

i want to ignore the text before modify and want to text after that. i want to pick from the first modify present and want entire text. it should not start from 2nd modify if present

DataOrg
Builder

Ex : hello how are you. pls modify the request and update. modify request cant be done and failed.

0 Karma
1 Solution

dineshraj9
Builder

You can use rex to update the existing field or create new field -
Example :

| makeresults | eval message="hello how are you. pls modify the request and update. modify request cant be done and failed." | rex field=message "(?<message>modify.+)"

Usage : <your search> | rex field=message "(?<modified_message>modify.+)"

View solution in original post

dineshraj9
Builder

You can use rex to update the existing field or create new field -
Example :

| makeresults | eval message="hello how are you. pls modify the request and update. modify request cant be done and failed." | rex field=message "(?<message>modify.+)"

Usage : <your search> | rex field=message "(?<modified_message>modify.+)"

Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

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 ...