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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...