<?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 Field extraction using regular expression under field extraction page in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509360#M2635</link>
    <description>&lt;P&gt;I need to write a common regex to match all the below patterns&amp;nbsp;&lt;/P&gt;&lt;P&gt;My regular expression written so far is&amp;nbsp;&lt;/P&gt;&lt;P&gt;(?P&amp;lt;timestamp&amp;gt;\w+\s+\d+\s+\d+:\d+:\d+)\s+(?P&amp;lt;src&amp;gt;\w+)\s+(?P&amp;lt;daemon&amp;gt;\w+):\s+(?P&amp;lt;message&amp;gt;(.*?)$)|(?J)(?P&amp;lt;timestamp&amp;gt;\w+\s+\d+\s+\d+:\d+:\d+)\s+(?P&amp;lt;src&amp;gt;\w+)\s+(?P&amp;lt;daemon&amp;gt;\w+)\[(?P&amp;lt;process_id&amp;gt;\d+)\]:\s+(?P&amp;lt;entry_type&amp;gt;\w+):\s+(?P&amp;lt;service_id&amp;gt;\w+)\s+\w+=((?P&amp;lt;status&amp;gt;0)|(?&amp;lt;pid&amp;gt;\d+))(\s+from=(?P&amp;lt;origin_ip&amp;gt;(.*?)$))&lt;/P&gt;&lt;P&gt;This matches 1st and 2nd pattern in regex101.com but when I put it in splunk it doesn't work matching unintended fields. Please help how to go with this&lt;/P&gt;&lt;P&gt;Jul 15 14:01:32 jiufc1fe330 xinetd[82352]: START: nrpe pid=151239 from=::ffff:14.956.44.41&lt;BR /&gt;Jul 15 12:30:36 dyue29200 systemd: Removed slice User Slice of root.&lt;BR /&gt;Jul 15 12:30:21 dtg280419 xinetd[16211]: EXIT: nrpe status=0 pid=8924 duration=0(sec)&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 17:33:18 GMT</pubDate>
    <dc:creator>sandeepduppalli</dc:creator>
    <dc:date>2020-07-15T17:33:18Z</dc:date>
    <item>
      <title>Field extraction using regular expression under field extraction page</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509360#M2635</link>
      <description>&lt;P&gt;I need to write a common regex to match all the below patterns&amp;nbsp;&lt;/P&gt;&lt;P&gt;My regular expression written so far is&amp;nbsp;&lt;/P&gt;&lt;P&gt;(?P&amp;lt;timestamp&amp;gt;\w+\s+\d+\s+\d+:\d+:\d+)\s+(?P&amp;lt;src&amp;gt;\w+)\s+(?P&amp;lt;daemon&amp;gt;\w+):\s+(?P&amp;lt;message&amp;gt;(.*?)$)|(?J)(?P&amp;lt;timestamp&amp;gt;\w+\s+\d+\s+\d+:\d+:\d+)\s+(?P&amp;lt;src&amp;gt;\w+)\s+(?P&amp;lt;daemon&amp;gt;\w+)\[(?P&amp;lt;process_id&amp;gt;\d+)\]:\s+(?P&amp;lt;entry_type&amp;gt;\w+):\s+(?P&amp;lt;service_id&amp;gt;\w+)\s+\w+=((?P&amp;lt;status&amp;gt;0)|(?&amp;lt;pid&amp;gt;\d+))(\s+from=(?P&amp;lt;origin_ip&amp;gt;(.*?)$))&lt;/P&gt;&lt;P&gt;This matches 1st and 2nd pattern in regex101.com but when I put it in splunk it doesn't work matching unintended fields. Please help how to go with this&lt;/P&gt;&lt;P&gt;Jul 15 14:01:32 jiufc1fe330 xinetd[82352]: START: nrpe pid=151239 from=::ffff:14.956.44.41&lt;BR /&gt;Jul 15 12:30:36 dyue29200 systemd: Removed slice User Slice of root.&lt;BR /&gt;Jul 15 12:30:21 dtg280419 xinetd[16211]: EXIT: nrpe status=0 pid=8924 duration=0(sec)&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 17:33:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509360#M2635</guid>
      <dc:creator>sandeepduppalli</dc:creator>
      <dc:date>2020-07-15T17:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using regular expression under field extraction page</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509379#M2636</link>
      <description>Is this for index-time or search-time field extraction?&lt;BR /&gt;Can you be more specific about how Splunk is failing? What unintended fields are matching?</description>
      <pubDate>Wed, 15 Jul 2020 19:35:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509379#M2636</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-15T19:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using regular expression under field extraction page</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509432#M2640</link>
      <description>&lt;P&gt;This is search time field extraction. I am using few captured named group for field names like timestamp,src etc.., twice with (?J) option but splunk recognizes them as different fields. How to use the same field name here?My basic aim to have a single regex for all log patterns mentioned.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 01:26:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509432#M2640</guid>
      <dc:creator>sandeepduppalli</dc:creator>
      <dc:date>2020-07-16T01:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using regular expression under field extraction page</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509523#M2655</link>
      <description>&lt;P&gt;Since this is a search-time extraction, consider using multiple &lt;FONT face="courier new,courier"&gt;rex&lt;/FONT&gt; commands.&amp;nbsp; That's often easier than crafting a single regex for all cases.&lt;/P&gt;&lt;P&gt;Also, try putting the &lt;FONT face="courier new,courier"&gt;(?J)&lt;/FONT&gt; flag at the beginning of your regex.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:45:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509523#M2655</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-16T13:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using regular expression under field extraction page</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509526#M2656</link>
      <description>&lt;P&gt;When using rex command with same named group it is giving the following error&lt;/P&gt;&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex '(?P&amp;lt;timestamp&amp;gt;\w+\s+\d+\s+\d+:\d+:\d+)\s+(?P&amp;lt;src&amp;gt;\w+)\s+(?P&amp;lt;daemon&amp;gt;\w+)\[(?P&amp;lt;&lt;STRONG&gt;process_id&lt;/STRONG&gt;&amp;gt;\d+)\]:\s+pid=(?P&amp;lt;&lt;STRONG&gt;process_id&lt;/STRONG&gt;&amp;gt;\d+)': Regex: two named subpatterns have the same name (PCRE2_DUPNAMES not set).&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:49:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509526#M2656</guid>
      <dc:creator>sandeepduppalli</dc:creator>
      <dc:date>2020-07-16T13:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using regular expression under field extraction page</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509536#M2660</link>
      <description>That's what the (?J) flag is for. Why did you leave it out?</description>
      <pubDate>Thu, 16 Jul 2020 14:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction-using-regular-expression-under-field-extraction/m-p/509536#M2660</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-16T14:28:07Z</dc:date>
    </item>
  </channel>
</rss>

