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!

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...