<?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 Re: What does (?m) mean at the beginning of a regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9063#M5</link>
    <description>&lt;P&gt;And just as importantly, rex will match against the entire event without (?m) even if there are line breaks.  With max_match=0, rex will even match on the pattern multiple times in the same event thus creating a multi-value field.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jul 2015 20:50:51 GMT</pubDate>
    <dc:creator>landen99</dc:creator>
    <dc:date>2015-07-17T20:50:51Z</dc:date>
    <item>
      <title>What does (?m) mean at the beginning of a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9059#M1</link>
      <description>&lt;P&gt;I saw this in \etc\system\README\transforms.conf.example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (?m)^(.*)SessionId=\w+(\w{4}[&amp;amp;"].*)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What does the (?m) mean before the caret?  Is this really matching 0 or 1 "m" characters at the end of the previous line, or does it have some special meaning?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2009 04:15:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9059#M1</guid>
      <dc:creator>Justin_Grant</dc:creator>
      <dc:date>2009-12-11T04:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: What does (?m) mean at the beginning of a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9060#M2</link>
      <description>&lt;P&gt;It declares the regex to read multiline data, i.e., don't stop the regex on a line break.&lt;/P&gt;

&lt;P&gt;The (?&amp;lt;option_flag&amp;gt;) construct allows you to set various matching properties like case-insensitivity, multiline, greedy, etc.  See &lt;A href="http://www.regextester.com/pregsyntax.html" rel="nofollow"&gt;http://www.regextester.com/pregsyntax.html&lt;/A&gt; for more info.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2009 05:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9060#M2</guid>
      <dc:creator>Johnvey</dc:creator>
      <dc:date>2009-12-11T05:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: What does (?m) mean at the beginning of a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9061#M3</link>
      <description>&lt;P&gt;In general, all Splunk regexes use the PCRE flavor of regex, which is substantially the same regex syntax as Perl, Python, PHP, but significantly different from grep (or egrep).&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2010 02:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9061#M3</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-01-15T02:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: What does (?m) mean at the beginning of a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9062#M4</link>
      <description>&lt;P&gt;More importantly, this "multiline mode" means that &lt;CODE&gt;^&lt;/CODE&gt; and &lt;CODE&gt;$&lt;/CODE&gt; match the beginning and end (respectively) of each &lt;I&gt;line&lt;/I&gt;, not the beginning and end of the &lt;I&gt;entire string&lt;/I&gt;. This is important in multiline events, in case you want to find an item at the beginning of a line somewhere in your event.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2013 04:27:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9062#M4</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-10-08T04:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: What does (?m) mean at the beginning of a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9063#M5</link>
      <description>&lt;P&gt;And just as importantly, rex will match against the entire event without (?m) even if there are line breaks.  With max_match=0, rex will even match on the pattern multiple times in the same event thus creating a multi-value field.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2015 20:50:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-does-m-mean-at-the-beginning-of-a-regex/m-p/9063#M5</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2015-07-17T20:50:51Z</dc:date>
    </item>
  </channel>
</rss>

