<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to use the DOTALL option in a regular expression in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-DOTALL-option-in-a-regular-expression/m-p/48253#M11528</link>
    <description>&lt;P&gt;I'm running a regular expression on a string which runs for 5 or more lines. The first few words on the first line helps me determine if the rest of the sentence is useful for me.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "(?P&amp;lt;Application&amp;gt;\w+[a-zA-Z]*) (?P&amp;lt;Message&amp;gt;.*+)" | fields Application, Message | Search Application ="abc"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;here I want to display results if my Application equates to "abc" which is at the beginning of my multi-line string, the Message variable has only the characters till the end of the first line, it does return characters from the second or third line&lt;/P&gt;

&lt;P&gt;Search String&lt;/P&gt;

&lt;P&gt;abc def &lt;/P&gt;

&lt;P&gt;ghi &lt;/P&gt;

&lt;P&gt;jkl&lt;/P&gt;

&lt;P&gt;The Application variable equates "abc" and Message return only "def", but I want it to return "def ghi jkl".&lt;/P&gt;

&lt;P&gt;How should the Regular expression be changed to achieve this?&lt;/P&gt;</description>
    <pubDate>Sat, 11 Sep 2010 03:45:56 GMT</pubDate>
    <dc:creator>tsingara</dc:creator>
    <dc:date>2010-09-11T03:45:56Z</dc:date>
    <item>
      <title>How to use the DOTALL option in a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-DOTALL-option-in-a-regular-expression/m-p/48253#M11528</link>
      <description>&lt;P&gt;I'm running a regular expression on a string which runs for 5 or more lines. The first few words on the first line helps me determine if the rest of the sentence is useful for me.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "(?P&amp;lt;Application&amp;gt;\w+[a-zA-Z]*) (?P&amp;lt;Message&amp;gt;.*+)" | fields Application, Message | Search Application ="abc"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;here I want to display results if my Application equates to "abc" which is at the beginning of my multi-line string, the Message variable has only the characters till the end of the first line, it does return characters from the second or third line&lt;/P&gt;

&lt;P&gt;Search String&lt;/P&gt;

&lt;P&gt;abc def &lt;/P&gt;

&lt;P&gt;ghi &lt;/P&gt;

&lt;P&gt;jkl&lt;/P&gt;

&lt;P&gt;The Application variable equates "abc" and Message return only "def", but I want it to return "def ghi jkl".&lt;/P&gt;

&lt;P&gt;How should the Regular expression be changed to achieve this?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Sep 2010 03:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-DOTALL-option-in-a-regular-expression/m-p/48253#M11528</guid>
      <dc:creator>tsingara</dc:creator>
      <dc:date>2010-09-11T03:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the DOTALL option in a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-DOTALL-option-in-a-regular-expression/m-p/48254#M11529</link>
      <description>&lt;P&gt;The correct nomenclature is to add (?ms) on the beginning - the s is dotall, and the m is multi-line.  Thus:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=_raw "(?ms)(?P&amp;lt;Application&amp;gt;\w+) (?P&amp;lt;Message&amp;gt;.*+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2012 22:23:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-DOTALL-option-in-a-regular-expression/m-p/48254#M11529</guid>
      <dc:creator>ahall_splunk</dc:creator>
      <dc:date>2012-02-21T22:23:43Z</dc:date>
    </item>
  </channel>
</rss>

