<?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: Field Extraction -Key/ Value Pairs with Special Character used as Delimiter. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644727#M223265</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried, but not sure why it's just extracted last 4 fields. Any thoughts?&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2023 10:27:56 GMT</pubDate>
    <dc:creator>SplunkDash</dc:creator>
    <dc:date>2023-05-26T10:27:56Z</dc:date>
    <item>
      <title>How to perform field extraction for key/value pairs with special character used as delimiter?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644702#M223255</link>
      <description>&lt;P class=""&gt;Hello,&lt;/P&gt;
&lt;P class=""&gt;I have events with Key/Value pair assigned by &lt;STRONG&gt;"="&lt;/STRONG&gt;Highlighted in Bold) and separated by special character &lt;STRONG&gt;"^".&lt;/STRONG&gt;&amp;nbsp; Some Key/Value pair don't have values (Example Application Data). How would I perform field extraction for these events? 4 sample events are provided below. Any help will be highly appreciated. Thank you so much.&lt;/P&gt;
&lt;P class=""&gt;&lt;STRONG&gt;4 Sample Events&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;STRONG&gt;Application data=&lt;/STRONG&gt;^&lt;STRONG&gt;Provider=TEST&lt;/STRONG&gt;^ClientID=7acc2a917-309d-461b-806a-8b34ea6232aed8^givenName=XYZ^surName=ABC^dateofBirth=1970-10-05^address=1940n Xaybas St Apt 1^city=ABC^state=NY^zip=50000^email=xyz@gmail.com^phone=10974173700^alevel=IAB7^SESSIONID=eZdfasRaMfTSSG2EDGUuT1UaYnWvk5rk=^AppID=OBA^TransD=4de099545e02-493s5-4720-9094-cef80cd71f7r3||2023-05-25T15:25:38.150Z||||||12.209.9.173|&lt;/P&gt;
&lt;P class=""&gt;Application data=^Provider=TEST^givenName=XYZ^surName=ABC^dateofBirth=1970-10-05^address=1940n Xaybas St Apt 1^city=ABC^state=NY^zip=50000^email=ayz@gmail.com^phone=10974173700^alevel=IAB7^sub=20216defba5c04b6c8481eca9d174d43cas^isass=&lt;A href="https://api.test/oasidc^" target="_blank" rel="noopener"&gt;https://api.test/oasidc^&lt;/A&gt;aud=[a255e650b9a8194b0264468854b57b41]^exp=Thu May 25 21:25:37 EDT 2023^iat=Thu May 25 11:25:37 EDT 2023^AppID=OBA^TransID=49df545e02-493d5-4720-90df94-cef80cd71f7bv3||2023-05-25T15:25:38.097Z||||||10.208.9.173|&lt;/P&gt;
&lt;P class=""&gt;Application data=^Provider=TEST^givenName=XYZ^surName=ABC^dateofBirth=1970-10-05^address=1940n Xaybas St Apt 1^city=ABC^state=NY^zip=50000^email=xyz@gmail.com^phone=10974173700^alevel=IAB7^sub=20216defse5c04b6c8481eca9d174d43c^isass=&lt;A href="https://api.test/oidfdc^" target="_blank" rel="noopener"&gt;https://api.test/oidfdc^&lt;/A&gt;aud=[a255e650dfdb9a8194b0264468854b57b41]^exp=Thu May 25 21:25:37 EDT 2023^iat=Thu May 25 11:25:37 EDT 2023^AppID=OBA^TransID=49sd545e02-493j5-4720-9ds094-cef80cd71fvv73||2023-05-25T15:25:38.094Z||||||12.208.9.173|&lt;/P&gt;
&lt;P class=""&gt;Application data=^Provider=eTEST^ID=9bsa5263e3-7423-4f01-a00f-4esse16e1693a8^givenName=MAAAMA^surName=SODA^dateofBirth=1968:10:20^address=92 Barca Boulevard^city=TAC^state=NH^zip=60000^email=mksds@gmail.com^phone=629-337-2349^alevel=D^SSIONID=pdffT2awi0gYTLbJo9kUtvosJsLnXNM=^AppID=OBA||2023-05-25T15:24:54.795Z||||||10.208.10.170|&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 12:42:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644702#M223255</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2023-05-26T12:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -Key/ Value Pairs with Special Character used as Delimiter.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644704#M223256</link>
      <description>&lt;LI-CODE lang="markup"&gt;| extract pairdelim="^" kvdelim="="&lt;/LI-CODE&gt;&lt;P&gt;Extract works on the _raw field, so you may want to preserve the _raw field if you are trying to extract from another field&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename _raw as temp
| rename field as _raw
| extract pairdelim="^" kvdelim="="
| rename _raw as field
| rename temp as _raw&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 May 2023 07:39:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644704#M223256</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-26T07:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -Key/ Value Pairs with Special Character used as Delimiter.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644706#M223257</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you so much for your quick response. But how I would implement it in my &lt;STRONG&gt;"In Line"&lt;/STRONG&gt; or &lt;STRONG&gt;Transformations&lt;/STRONG&gt; Field Extractions Or how I would incorporate it in &lt;STRONG&gt;props.conf/transforms.conf&lt;/STRONG&gt; files. Any help will be appreciated. Thank you so much again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 07:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644706#M223257</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2023-05-26T07:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -Key/ Value Pairs with Special Character used as Delimiter.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644707#M223258</link>
      <description>&lt;P&gt;tbh, I am not expert at this side of Splunk, but you could try this in your transforms.conf stanza&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DELIMS = "^", "="&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 May 2023 08:00:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644707#M223258</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-26T08:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -Key/ Value Pairs with Special Character used as Delimiter.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644714#M223261</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;just like&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;said, you should add props.conf (via file or GUI)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[&amp;lt;your sourcetype&amp;gt;]
REPORT-delims-by-carret = delims-by-carret&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;then transforms.conf (this needs to add via file, as GUI wants also FIELD list).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[delims-by-carret]
DELIMS = "^","="
MV_ADD = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MV_ADD should be there if there could be MV value fields.&lt;/P&gt;&lt;P&gt;NOTE: Order of DELIMS character is important to get only wanted fieldnames. Unfortunately this seems to handle empty fields incorrectly (see e.g. data which contains all text until next space character. So you need to add additional handling for those fields if/when needed.&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 09:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644714#M223261</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-05-26T09:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -Key/ Value Pairs with Special Character used as Delimiter.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644715#M223262</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you so much for your quick response, truly appreciate it. Let me try it and get back to you. Thank you again.&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 09:11:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644715#M223262</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2023-05-26T09:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -Key/ Value Pairs with Special Character used as Delimiter.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644727#M223265</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried, but not sure why it's just extracted last 4 fields. Any thoughts?&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 10:27:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644727#M223265</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2023-05-26T10:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -Key/ Value Pairs with Special Character used as Delimiter.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644744#M223267</link>
      <description>&lt;P&gt;Probably you have some other settings which confusing that? With your examples, it work in my test environment, except those field name which contains space like "Application data".&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try this on props.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[your sourcetype]
REPORT-test-delims-by-carret = extract-fields-by-carret&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and in transforms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[extract-fields-by-carret]
FORMAT = $1::$2
REGEX = ([^=]+)=([^\^]*)\^?&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately even this didn't extract correctly field "Application data" even it should. This works correctly on regex101.com.&lt;/P&gt;&lt;P&gt;I'm testing this on Splunk 9.0.4.1.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="isoutamo_0-1685102877611.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/25565iC5EC547801F26454/image-size/medium?v=v2&amp;amp;px=400" role="button" title="isoutamo_0-1685102877611.png" alt="isoutamo_0-1685102877611.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 12:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644744#M223267</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-05-26T12:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -Key/ Value Pairs with Special Character used as Delimiter.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644746#M223268</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I know this is the best we can do for now. Thank you so much, truly appreciate your support.&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 12:37:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-field-extraction-for-key-value-pairs-with-special/m-p/644746#M223268</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2023-05-26T12:37:20Z</dc:date>
    </item>
  </channel>
</rss>

