<?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: How to write the regex to extract numbers between two hyphens? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-numbers-between-two-hyphens/m-p/207098#M60365</link>
    <description>&lt;P&gt;is it this simple?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\-\d\d\-

\-  = escapes the 1st hyphen
\d\d  =  2 digits
\-  = escapes the 2nd hyphen
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;-ALF&lt;/P&gt;</description>
    <pubDate>Wed, 17 Feb 2016 20:31:12 GMT</pubDate>
    <dc:creator>angelo_fazzina</dc:creator>
    <dc:date>2016-02-17T20:31:12Z</dc:date>
    <item>
      <title>How to write the regex to extract numbers between two hyphens?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-numbers-between-two-hyphens/m-p/207096#M60363</link>
      <description>&lt;P&gt;I have the following string &lt;STRONG&gt;2016-02-17&lt;/STRONG&gt; field and I would like to extract the 02 between the hyphens. Does someone have a regex that will do this?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 20:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-numbers-between-two-hyphens/m-p/207096#M60363</guid>
      <dc:creator>jhayIV</dc:creator>
      <dc:date>2016-02-17T20:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the regex to extract numbers between two hyphens?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-numbers-between-two-hyphens/m-p/207097#M60364</link>
      <description>&lt;P&gt;Sure,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\d{4}-(?&amp;lt;month&amp;gt;\d{2})-\d{2}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Check out &lt;A href="http://www.regex101.com"&gt;www.regex101.com&lt;/A&gt;  It can help with building out/learning regular expressions.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 20:28:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-numbers-between-two-hyphens/m-p/207097#M60364</guid>
      <dc:creator>vasildavid</dc:creator>
      <dc:date>2016-02-17T20:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the regex to extract numbers between two hyphens?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-numbers-between-two-hyphens/m-p/207098#M60365</link>
      <description>&lt;P&gt;is it this simple?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\-\d\d\-

\-  = escapes the 1st hyphen
\d\d  =  2 digits
\-  = escapes the 2nd hyphen
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;-ALF&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 20:31:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-numbers-between-two-hyphens/m-p/207098#M60365</guid>
      <dc:creator>angelo_fazzina</dc:creator>
      <dc:date>2016-02-17T20:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the regex to extract numbers between two hyphens?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-numbers-between-two-hyphens/m-p/207099#M60366</link>
      <description>&lt;P&gt;Thank you so much I think I messed up the regex command in the search field &lt;BR /&gt;
I entered the string below in the search field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex mode=sed"\d{4}-(?\d{2})-\d{2}"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Feb 2016 21:45:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-numbers-between-two-hyphens/m-p/207099#M60366</guid>
      <dc:creator>jhayIV</dc:creator>
      <dc:date>2016-02-17T21:45:06Z</dc:date>
    </item>
  </channel>
</rss>

