Getting Data In

how to find n th line data using rex

srinathd
Contributor

Hi,

how to find nth line data in an event. for example: I have to get 7th line data and needs to correlate with the corresponding values in 8th line. how to achieve this

abc
xyz
1
001

45654
abc def ghi jkl mno
pqr stu vwx yza bcd
345

001

Thanks,
Srinath

Tags (1)
0 Karma
1 Solution

srinathd
Contributor

Using the rex we can extract 7 th line data from the multiline event
example: |rex "([^\n\r]*\n){6}(?[^\n\r]*)\n"

View solution in original post

0 Karma

srinathd
Contributor

Using the rex we can extract 7 th line data from the multiline event
example: |rex "([^\n\r]*\n){6}(?[^\n\r]*)\n"

0 Karma

srinathd
Contributor

get nth line data

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...