<?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: Extracting multiple values from a Field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-values-from-a-Field/m-p/368200#M108536</link>
    <description>&lt;P&gt;Try something like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=VolumeInfo "Name=\"(?&amp;lt;temp1&amp;gt;[^\"]+)"  max_match=0
| rex field=VolumeInfo "TotalSize=\"(?&amp;lt;temp2&amp;gt;[^\"]+)"  max_match=0
| rex field=VolumeInfo "DataTransferred=\"(?&amp;lt;temp3&amp;gt;[^\"]+)"  max_match=0
| eval mydata=mvzip(mvzip(temp1,temp2,"!!!!"),temp3,"!!!!")
| mvexpand mydata
| rex field=mydata "^(?&amp;lt;Name&amp;gt;.*?)!!!!(?&amp;lt;TotalSize&amp;gt;.*?)!!!!(?&amp;lt;DataTransferred&amp;gt;.*?)$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 28 Sep 2017 04:41:45 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-09-28T04:41:45Z</dc:date>
    <item>
      <title>Extracting multiple values from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-values-from-a-Field/m-p/368197#M108533</link>
      <description>&lt;P&gt;I have a field in Windows Backup Events named VolumesInfo&lt;BR /&gt;
Sample:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;VolumeInfoItem Name="System" OriginalAccessPath="" State="14" HResult="0" DetailedHResult="0" PreviousState="9" IsCritical="1" IsIncremental="0" BlockLevel="1" HasFiles="0" HasSystemState="1" IsCompacted="0" IsPruned="0" IsRecreateVhd="0" FullBackupReason="0" DataTransferred="54001664" NumUnreadableBytes="0" TotalSize="54001664" TotalNoOfFiles="0" Flags="554" BackupTypeDetermined="1" SSBTotalNoOfFiles="0" SSBTotalSizeOnDisk="0" /&amp;gt;&amp;lt;VolumeInfoItem Name="C:" OriginalAccessPath="C:" State="14" HResult="0" DetailedHResult="0" PreviousState="9" IsCritical="1" IsIncremental="0" BlockLevel="1" HasFiles="0" HasSystemState="1" IsCompacted="0" IsPruned="0" IsRecreateVhd="0" FullBackupReason="0" DataTransferred="35564748800" NumUnreadableBytes="0" TotalSize="35564748800" TotalNoOfFiles="0" Flags="1576" BackupTypeDetermined="1" SSBTotalNoOfFiles="0" SSBTotalSizeOnDisk="0" /&amp;gt;&amp;lt;VolumeInfoItem Name="D:" OriginalAccessPath="D:" State="14" HResult="0" DetailedHResult="0" PreviousState="9" IsCritical="0" IsIncremental="0" BlockLevel="1" HasFiles="0" HasSystemState="0" IsCompacted="0" IsPruned="0" IsRecreateVhd="0" FullBackupReason="0" DataTransferred="3730767872" NumUnreadableBytes="0" TotalSize="3730767872" TotalNoOfFiles="0" Flags="8" BackupTypeDetermined="1" SSBTotalNoOfFiles="0" SSBTotalSizeOnDisk="0" /&amp;gt;&amp;lt;/VolumeInfo&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This contains information about all the volumes backedup on a certain Computer. However I am struggling to extract all the multiple Volumes and related information like in the sample data there are three volumes "System", "C:" and "D:".&lt;/P&gt;

&lt;P&gt;I have tried field extractions but it only returns the first one. makemv and mvexpand is also not helping. I need results in this format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Compuer VolumeName  TotalSize   DataTransferred
Server1 System      1212             12
Server1 C:        7575            77
Server1 D:        7676            66
Server2 C:        767               7
    and So on…    
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Sep 2017 04:14:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-values-from-a-Field/m-p/368197#M108533</guid>
      <dc:creator>nabeel652</dc:creator>
      <dc:date>2017-09-28T04:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting multiple values from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-values-from-a-Field/m-p/368198#M108534</link>
      <description>&lt;P&gt;the TotalSize 1212, 7575.. and DataTransferred are not there at the sample. &lt;BR /&gt;
(on the sample - TotalSize="54001664",  DataTransferred="54001664")&lt;/P&gt;

&lt;P&gt;can you please update clearly how these details you found&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 04:36:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-values-from-a-Field/m-p/368198#M108534</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-09-28T04:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting multiple values from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-values-from-a-Field/m-p/368199#M108535</link>
      <description>&lt;P&gt;Yes, thats just for explaining. I was bit lazy not copying the actual values &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 04:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-values-from-a-Field/m-p/368199#M108535</guid>
      <dc:creator>nabeel652</dc:creator>
      <dc:date>2017-09-28T04:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting multiple values from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-values-from-a-Field/m-p/368200#M108536</link>
      <description>&lt;P&gt;Try something like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=VolumeInfo "Name=\"(?&amp;lt;temp1&amp;gt;[^\"]+)"  max_match=0
| rex field=VolumeInfo "TotalSize=\"(?&amp;lt;temp2&amp;gt;[^\"]+)"  max_match=0
| rex field=VolumeInfo "DataTransferred=\"(?&amp;lt;temp3&amp;gt;[^\"]+)"  max_match=0
| eval mydata=mvzip(mvzip(temp1,temp2,"!!!!"),temp3,"!!!!")
| mvexpand mydata
| rex field=mydata "^(?&amp;lt;Name&amp;gt;.*?)!!!!(?&amp;lt;TotalSize&amp;gt;.*?)!!!!(?&amp;lt;DataTransferred&amp;gt;.*?)$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Sep 2017 04:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-values-from-a-Field/m-p/368200#M108536</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-28T04:41:45Z</dc:date>
    </item>
  </channel>
</rss>

