<?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: Regex field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/561910#M195433</link>
    <description>&lt;P&gt;This might work better if you have spaces in fieldnames&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;fieldname&amp;gt;.+?)\s:\s(?&amp;lt;fieldvalue&amp;gt;.+?)(?&amp;lt;!\s)?(\s-|$)&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 03 Aug 2021 14:57:07 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-08-03T14:57:07Z</dc:date>
    <item>
      <title>Regex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/561887#M195425</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have one sourcetype that does not allow me to create a static field extraction, because we have several fields with different name and is almost impossible to cover all of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data is similar to this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fieldname1 : values1 with spaces - fieldname2 : value2 - fieldname3 : value-for-field3 &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;field name4 : values4withoutspaces - fieldname5 : value5 (this should be included in value5) - fieldname6 : value-for-field3 fieldname7 : &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;All kv pairs are delimitd by " - " and the pair delimiter&amp;nbsp; is " : " .&lt;/P&gt;&lt;P&gt;To cover this requirement, I have a field transforms that uses a regex to calculate key-value pairs automatically&lt;/P&gt;&lt;P&gt;[wildcard_extractions]&lt;BR /&gt;CLEAN_KEYS = 0&lt;BR /&gt;FORMAT = $1::$2&lt;BR /&gt;REGEX =&amp;nbsp;(\S+)\s:\s(\S+)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROBLEM: When the field name or the value has spaces,&amp;nbsp; I can not get the full values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could some, more experienced than me, help me with my regex expression, please?&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/R9XhmD/1" target="_blank" rel="noopener"&gt;https://regex101.com/r/R9XhmD/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 14:05:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/561887#M195425</guid>
      <dc:creator>nmsaraujo</dc:creator>
      <dc:date>2021-08-03T14:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/561900#M195428</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;fieldname&amp;gt;[\S]+) : (?&amp;lt;fieldvalue&amp;gt;[^:]+)(?&amp;lt;!\s)?(\s-|$)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 03 Aug 2021 14:29:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/561900#M195428</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-03T14:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/561907#M195432</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; for the swift reply.&lt;/P&gt;&lt;P&gt;With your suggested regex I still have issues with fields and values that includes spaces, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 14:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/561907#M195432</guid>
      <dc:creator>nmsaraujo</dc:creator>
      <dc:date>2021-08-03T14:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/561910#M195433</link>
      <description>&lt;P&gt;This might work better if you have spaces in fieldnames&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;fieldname&amp;gt;.+?)\s:\s(?&amp;lt;fieldvalue&amp;gt;.+?)(?&amp;lt;!\s)?(\s-|$)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 03 Aug 2021 14:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/561910#M195433</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-03T14:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Regex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/562025#M195463</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great work!!!!!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 07:03:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction/m-p/562025#M195463</guid>
      <dc:creator>nmsaraujo</dc:creator>
      <dc:date>2021-08-04T07:03:54Z</dc:date>
    </item>
  </channel>
</rss>

