Splunk Search

How to regex up to a specific word?

Path Finder

How can I create a regex query up to a Specific word? For example, the specific word below is "Index".
Example data:
1. ... Retirement Priority Index ...
2. ... Working Priority Index ...
3. ... Test Priority 1 Index ...

Current regex :

| rex "(?<priority>[^I]*)"
0 Karma
1 Solution

SplunkTrust
SplunkTrust

Hi limalbert,

give this a try:

 (?<priority>[\w\s]+)\sIndex

Hope this helps ...

cheers, MuS

View solution in original post

0 Karma

SplunkTrust
SplunkTrust

Hi limalbert,

give this a try:

 (?<priority>[\w\s]+)\sIndex

Hope this helps ...

cheers, MuS

View solution in original post

0 Karma