Splunk Search

how to match new lines in splunk

ankithreddy777
Contributor

I have a event as below

nam=this is org name;
-this is hyta name;
-this is hju name;

falu= this is gao name

I need to match multiple lines. until the line "falu=". May I know how to match multiple lines.

0 Karma

aaraneta_splunk
Splunk Employee
Splunk Employee

@ankithreddy777 - Did one of the answers below help provide a solution your question? If yes, please click “Accept” below the best answer to resolve this post and upvote anything that was helpful. If no, please leave a comment with more feedback. Thanks.

0 Karma

woodcock
Esteemed Legend

You need to specify multiline like this:

Your Base Search | rex "(?ms)name=(?<YourField>(.+)[\r\n]+falu="
0 Karma

somesoni2
Revered Legend

Give this a try

your base search | rex "name=(?<YourField>(.+[\r\n]+)falu="
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...