Splunk Search

Regex that matches all characters including newline

jbrenner
Path Finder

What's the simplest regex that will match any character including newline? I want to be able to match all unknown content between two very specific capture groups.

Thanks! Jonathan

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Start with (?s)

| makeresults
| eval _raw="ABC
DEF
GHI"
| rex "(?s)ABC(?<middle>.*)GHI"
0 Karma

jbrenner
Path Finder

Thanks, ITWhisperer. Perhaps I didn't ask my question clearly enough. I was looking for something like this:

[\S\s\n\t\r\n\f.]+

It may be redundant, but it seems to work.

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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