<?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: Why does Splunk suggest using Regex101.com? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361824#M106877</link>
    <description>&lt;P&gt;&lt;CODE&gt;(?m)(?:Port Sing.+)|((?(\w{2}\d\/\d\/\d+|\w{2}\d\/\d+|\w{2}\d))\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This is the final regex I desire to work, so I have names attached to the data points....&lt;/P&gt;</description>
    <pubDate>Thu, 08 Feb 2018 14:35:11 GMT</pubDate>
    <dc:creator>panderla</dc:creator>
    <dc:date>2018-02-08T14:35:11Z</dc:date>
    <item>
      <title>Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361823#M106876</link>
      <description>&lt;P&gt;The Regex I create extract fields inside the Regex101 site, but do nothing in Splunk.  What gives?&lt;/P&gt;

&lt;P&gt;Regex in use on REGEX101&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?m)(?:Port Sing.+)|((?(\w{2}\d\/\d\/\d+|\w{2}\d\/\d+|\w{2}\d))\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Data to extract fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;08:05:24.378 CST Thu Feb 8 2018 show interface counter errors ! Port Align-Err FCS-Err Xmit-Err Rcv-Err UnderSize OutDiscards Te1/0/1 0 0 1744790 0 0 1744790 Te1/0/2 0 0 6469254 0 0 6469254 Te1/0/3 0 0 0 0 0 0 Te1/0/4 0 0 0 0 0 0 Te1/0/5 0 0 0 0 0 0 Te1/0/6 0 0 1267548 1 0 1267548 Te1/0/7 0 0 7684 0 0 7684 Te1/0/8 0 0 73834268 0 0 73834268 Te1/0/9 0 0 15942062 0 0 15942062 Te1/0/10 0 0 0 0 0 0 Te1/0/11 0 0 0 0 0 0 Te1/0/12 0 0 0 0 0 0 Te2/0/1 0 0 848712196 0 0 848712196 Te2/0/2 0 0 865058003 0 0 865058003 Te2/0/3 0 0 2889546544 0 0 2889546544 Te2/0/4 0 0 3572229813 0 0 3572229813 Te2/0/5 0 0 3909332507 0 0 3909332507 Te2/0/6 0 0 5020658442 0 0 5020658442 Te2/0/7 0 0 4707980415 0 0 4707980415 Te2/0/8 0 0 430216868 0 0 430216868 Te2/0/9 0 0 105839820 0 0 105839820 Te2/0/10 0 0 382786 0 0 382786 Te2/0/11 0 0 379470 0 0 379470 Te2/0/12 0 0 242880 0 0 242880 Port Single-Col Multi-Col Late-Col Excess-Col Carri-Sen Runts Te1/0/1 0 0 0 0 0 0 Te1/0/2 0 0 0 0 0 0 Te1/0/3 0 0 0 0 0 0 Te1/0/4 0 0 0 0 0 0 Te1/0/5 0 0 0 0 0 0 Te1/0/6 0 0 0 0 0 0 Te1/0/7 0 0 0 0 0 0 Te1/0/8 0 0 0 0 0 0 Te1/0/9 0 0 0 0 0 0 Te1/0/10 0 0 0 0 0 0 Te1/0/11 0 0 0 0 0 0 Te1/0/12 0 0 0 0 0 0 Te2/0/1 0 0 0 0 0 0 Te2/0/2 0 0 0 0 0 0 Te2/0/3 0 0 0 0 0 0 Te2/0/4 0 0 0 0 0 0 Te2/0/5 0 0 0 0 0 0 Te2/0/6 0 0 0 0 0 0 Te2/0/7 0 0 0 0 0 0 Te2/0/8 0 0 0 0 0 0 Te2/0/9 0 0 0 0 0 0 Te2/0/10 0 0 0 0 0 0 Te2/0/11 0 0 0 0 0 0 Te2/0/12 0 0 0 0 0 0 !
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2018 14:28:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361823#M106876</guid>
      <dc:creator>panderla</dc:creator>
      <dc:date>2018-02-08T14:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361824#M106877</link>
      <description>&lt;P&gt;&lt;CODE&gt;(?m)(?:Port Sing.+)|((?(\w{2}\d\/\d\/\d+|\w{2}\d\/\d+|\w{2}\d))\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This is the final regex I desire to work, so I have names attached to the data points....&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 14:35:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361824#M106877</guid>
      <dc:creator>panderla</dc:creator>
      <dc:date>2018-02-08T14:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361825#M106878</link>
      <description>&lt;P&gt;The forum stripped out your field names.  Please post a new comment in backticks (`) to show the full regex string you're using.&lt;/P&gt;

&lt;P&gt;Regex101.com is a great site.  Be sure to select the "PCRE" flavor so the site's behavior best matches Splunk's.&lt;/P&gt;

&lt;P&gt;Why do you have a non-capturing group as one option in your regex?  It won't do anything.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 16:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361825#M106878</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-02-08T16:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361826#M106879</link>
      <description>&lt;P&gt;My non-capturing group is meant to exclude that bit of data, so the other data is searchable and meaningful.&lt;/P&gt;

&lt;P&gt;I have the PCRE box checked as recommended.&lt;/P&gt;

&lt;P&gt;Try again on the regex paste process....&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;(?m)(?:Port Sing.+)|((?&amp;lt;interface&amp;gt;(\w{2}\d\/\d\/\d+|\w{2}\d\/\d+|\w{2}\d))\s(?&amp;lt;align_err&amp;gt;\d+)\s(?&amp;lt;fcs_err&amp;gt;\d+)\s(?&amp;lt;xmit_err&amp;gt;\d+)\s(?&amp;lt;rcv_err&amp;gt;\d+)\s(?&amp;lt;undersize&amp;gt;\d+)\s(?&amp;lt;outdiscards&amp;gt;\d+)\s)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 17:13:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361826#M106879</guid>
      <dc:creator>panderla</dc:creator>
      <dc:date>2018-02-08T17:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361827#M106880</link>
      <description>&lt;P&gt;Hmm...when you say this does nothing inside Splunk, can you elaborate? I tried making a result with your sample data and applying the regular expression via &lt;CODE&gt;rex&lt;/CODE&gt;, and it extracted all fields correctly, I believe. Just to verify, this is what you're using in Splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "(?m)(?:Port Sing.+)|((?&amp;lt;interface&amp;gt;(\w{2}\d\/\d\/\d+|\w{2}\d\/\d+|\w{2}\d))\s(?&amp;lt;align_err&amp;gt;\d+)\s(?&amp;lt;fcs_err&amp;gt;\d+)\s(?&amp;lt;xmit_err&amp;gt;\d+)\s(?&amp;lt;rcv_err&amp;gt;\d+)\s(?&amp;lt;undersize&amp;gt;\d+)\s(?&amp;lt;outdiscards&amp;gt;\d+)\s)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is that correct? Because on my system, that works perfectly with the sample event.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 17:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361827#M106880</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-08T17:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361828#M106881</link>
      <description>&lt;P&gt;I have a sourcetype defined as follows:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[interface_counter_errors_1]&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
LINE_BREAKER = ((Port Single-Col Multi-Col Late-Col Excess-Col Carri-Sen Runts.+)|(\w{2}\d\/\d\/\d+\s\d+\s\d+\s\d+\s\d+\s\d+\s\d+\s)|(\w{2}\d\/\d+\s\d+\s\d+\s\d+\s\d+\s\d+\s\d+\s)|(\w{2}\d\s\d+\s\d+\s\d+\s\d+\s\d+\s\d+\s))&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 32&lt;BR /&gt;
disabled = false&lt;BR /&gt;
TIME_FORMAT = %H:%M:%S.%3N %Z %a %b %e %Y&lt;BR /&gt;
TIME_PREFIX = ^&lt;BR /&gt;
TRUNCATE = 10000&lt;BR /&gt;
DATETIME_CONFIG =&lt;BR /&gt;
category = Custom&lt;BR /&gt;
EXTRACT-error_data = (?m)(?:Port Sing.+)|((?(\w{2}\d\/\d\/\d+|\w{2}\d\/\d+|\w{2}\d))\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s(?\d+)\s)&lt;BR /&gt;
LOOKUP-interface_counter_errors = SnowMirror_cmdb_ci_netgear name AS host OUTPUTNEW dv_u_mosaic_machine_line AS machine_line&lt;BR /&gt;
pulldown_type = 1&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 18:13:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361828#M106881</guid>
      <dc:creator>panderla</dc:creator>
      <dc:date>2018-02-08T18:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361829#M106882</link>
      <description>&lt;P&gt;also include max_match=0 to match all and gives same output as regex101&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex max_match=0 field=_raw "(?m)(?:Port Sing.+)|((?&amp;lt;interface&amp;gt;(\w{2}\d\/\d\/\d+|\w{2}\d\/\d+|\w{2}\d))\s(?&amp;lt;align_err&amp;gt;\d+)\s(?&amp;lt;fcs_err&amp;gt;\d+)\s(?&amp;lt;xmit_err&amp;gt;\d+)\s(?&amp;lt;rcv_err&amp;gt;\d+)\s(?&amp;lt;undersize&amp;gt;\d+)\s(?&amp;lt;outdiscards&amp;gt;\d+)\s)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2018 18:19:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361829#M106882</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-08T18:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361830#M106883</link>
      <description>&lt;P&gt;When the data is indexed with the EXTRACT-error_data, I expect the extracted fields to show up in the interesting fields area of search, however no such luck......&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 18:23:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361830#M106883</guid>
      <dc:creator>panderla</dc:creator>
      <dc:date>2018-02-08T18:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361831#M106884</link>
      <description>&lt;P&gt;Where do I define the max_match=0 so this is auto extracted?  props.conf?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 18:25:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361831#M106884</guid>
      <dc:creator>panderla</dc:creator>
      <dc:date>2018-02-08T18:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk suggest using Regex101.com?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361832#M106885</link>
      <description>&lt;P&gt;not sure if we can mention it in props.conf&lt;BR /&gt;
Else you need to move the extraction to transforms.conf, and specify MV_ADD=true&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 18:39:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-Splunk-suggest-using-Regex101-com/m-p/361832#M106885</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-08T18:39:26Z</dc:date>
    </item>
  </channel>
</rss>

