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
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...