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="

somesoni2
Revered Legend

Give this a try

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

Community Feedback

We Want to Hear from You! Share Your Feedback on the Splunk Community   The Splunk Community is built for you ...

Manual Instrumentation with Splunk Observability Cloud: Implementing the ...

In our observability journey so far, we've built comprehensive instrumentation for our Worms in Space ...

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...