<?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 How to extract field between double quotes using rex? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635276#M15760</link>
    <description>&lt;P&gt;We have multiple lines within double quotes and to be updated in the different field names according to the name we have.&lt;/P&gt;
&lt;P&gt;All values has to be in different field names separately which is within double quotes&lt;/P&gt;
&lt;P&gt;the below regex is working and but picking all the values and updating in one field, i am looking for&lt;/P&gt;
&lt;P&gt;1. where the value within first double quotes getting picked in one common field name&lt;/P&gt;
&lt;P&gt;2. where the value within second double quotes getting picked in second common field name&lt;/P&gt;
&lt;P&gt;3. where the value within third double quotes getting picked in third common field name&lt;/P&gt;
&lt;P&gt;| rex "\\\"(?&amp;lt;JobId&amp;gt;[^\\\"]+)"&lt;/P&gt;
&lt;DIV class=""&gt;"17449551"&lt;/DIV&gt;
&lt;DIV class=""&gt;"pmqcd1p3"&lt;/DIV&gt;
&lt;DIV class=""&gt;"SAP for Oracle"&lt;/DIV&gt;
&lt;DIV class=""&gt;"PMQ"&lt;/DIV&gt;
&lt;DIV class=""&gt;"N/A"&lt;/DIV&gt;
&lt;DIV class=""&gt;"default"&lt;/DIV&gt;
&lt;DIV class=""&gt;"(Logcommand line)"&lt;/DIV&gt;</description>
    <pubDate>Tue, 21 Mar 2023 16:56:19 GMT</pubDate>
    <dc:creator>sureshkumaar</dc:creator>
    <dc:date>2023-03-21T16:56:19Z</dc:date>
    <item>
      <title>How to extract field between double quotes using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635276#M15760</link>
      <description>&lt;P&gt;We have multiple lines within double quotes and to be updated in the different field names according to the name we have.&lt;/P&gt;
&lt;P&gt;All values has to be in different field names separately which is within double quotes&lt;/P&gt;
&lt;P&gt;the below regex is working and but picking all the values and updating in one field, i am looking for&lt;/P&gt;
&lt;P&gt;1. where the value within first double quotes getting picked in one common field name&lt;/P&gt;
&lt;P&gt;2. where the value within second double quotes getting picked in second common field name&lt;/P&gt;
&lt;P&gt;3. where the value within third double quotes getting picked in third common field name&lt;/P&gt;
&lt;P&gt;| rex "\\\"(?&amp;lt;JobId&amp;gt;[^\\\"]+)"&lt;/P&gt;
&lt;DIV class=""&gt;"17449551"&lt;/DIV&gt;
&lt;DIV class=""&gt;"pmqcd1p3"&lt;/DIV&gt;
&lt;DIV class=""&gt;"SAP for Oracle"&lt;/DIV&gt;
&lt;DIV class=""&gt;"PMQ"&lt;/DIV&gt;
&lt;DIV class=""&gt;"N/A"&lt;/DIV&gt;
&lt;DIV class=""&gt;"default"&lt;/DIV&gt;
&lt;DIV class=""&gt;"(Logcommand line)"&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Mar 2023 16:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635276#M15760</guid>
      <dc:creator>sureshkumaar</dc:creator>
      <dc:date>2023-03-21T16:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field between double quotes using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635292#M15762</link>
      <description>&lt;P&gt;Please share your complete raw event in a code block &amp;lt;/&amp;gt; so that formatting is not compromised.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 12:18:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635292#M15762</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-21T12:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field between double quotes using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635301#M15764</link>
      <description>&lt;P&gt;Hi&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;This is the raw event coming from a CSV file&lt;/P&gt;&lt;P&gt;The values which ever coming in double quotes has to be separated and get updated in unique field names&lt;BR /&gt;Even if there are empty within the double quotes it shouldn't skip&lt;BR /&gt;Some times characters are lengthy which shouldn't get updated in another field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"17449551","pmqcd1p3","SAP for Oracle","PMQ","N/A","default","(Logcommand line)","Backup 3RD","Full(Log)","Mar 20, 2023","Mar 20, 2023, 10:21:16 AM","20","","0","Failed","CVLT","Error occurred in Disk Media, For more help, please call your vendor's support hotline.&amp;lt;br&amp;gt;Source: CVLT-NGDC-E11-MA05, Process: cvd","","","Mar 20, 2023, 10:41:49 AM"&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 12:55:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635301#M15764</guid>
      <dc:creator>sureshkumaar</dc:creator>
      <dc:date>2023-03-21T12:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field between double quotes using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635305#M15765</link>
      <description>&lt;P&gt;Assuming all your field values are in double quotes, even the numerics, and that you have no embedded / escaped double quotes, you can do something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=0 "(?&amp;lt;field&amp;gt;\"[^\"]*\")"
| eval field1=mvindex(field,0)
| eval field2=mvindex(field,1)&lt;/LI-CODE&gt;&lt;P&gt;Note, mvindex indexes start at zero - obviously you can name the fields how you like, not necessarily "field1", "field2", etc.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 13:02:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635305#M15765</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-21T13:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field between double quotes using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635314#M15766</link>
      <description>&lt;P&gt;My issue here is actually,&lt;/P&gt;&lt;P&gt;the below line is actually has to be covered under a field called "Failure Reason" and when i am giving the below mvindex command it's working fine&lt;/P&gt;&lt;P&gt;but not all the failure reason occupy in 2 mvindex values, some are occupying in 1 and some are occupying more than 1 (2 OR 3 OR 4)&lt;/P&gt;&lt;P&gt;| eval "Failure Reason"=mvindex(_raw,19,20)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Error occurred in Disk Media, For more help, please call your vendor's support hotline.&amp;lt;br&amp;gt;Source: CVLT-NGDC-E11-MA05, Process: cvd"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and another issue here is if we have 2 empty&amp;nbsp;values, and when i am giving the below mvindex it's picking the value which is supposed to get update in the 23rd mvindex (i.e. data time stamp getting updated) instead of staying blank&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| eval "Failure Reason"=mvindex(_raw,21)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Mar 20, 2023, 10:41:49 AM"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 13:22:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635314#M15766</guid>
      <dc:creator>sureshkumaar</dc:creator>
      <dc:date>2023-03-21T13:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field between double quotes using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635321#M15767</link>
      <description>&lt;P&gt;Please show your complete SPL and the raw event which is giving you problems&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 13:29:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-extract-field-between-double-quotes-using-rex/m-p/635321#M15767</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-21T13:29:30Z</dc:date>
    </item>
  </channel>
</rss>

