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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...