Splunk Search

How to extract subword from a string?

aa0
Path Finder

Hi all,

I want to extract the following word with rex expression:

ABC\qq1234 

expected result: qq1234

Please note that the substring needed will always after ABC\. Any help will be appreciated!

Labels (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

| rex "ABC\\(?<subword>\w+)"

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

| rex "ABC\\(?<subword>\w+)"
0 Karma

aa0
Path Finder

Thanks a lot! It working well with 3 backslashes used instead in order to escape a backslash character.

0 Karma
Get Updates on the Splunk Community!

Splunk is Nurturing Tomorrow’s Cybersecurity Leaders Today

Meet Carol Wright. She leads the Splunk Academic Alliance program at Splunk. The Splunk Academic Alliance ...

Part 2: A Guide to Maximizing Splunk IT Service Intelligence

Welcome to the second segment of our guide. In Part 1, we covered the essentials of getting started with ITSI ...

Part 1: A Guide to Maximizing Splunk IT Service Intelligence

As modern IT environments continue to grow in complexity and speed, the ability to efficiently manage and ...