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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...