<?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 edit my regular expression to extract these fields from my sample data using rex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218624#M64237</link>
    <description>&lt;P&gt;Looking for some help with rex. The raw data looks like this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;value= Name : SiteScope.exe MemGB : 6568 Name : powershell_ise.exe MemGB : 153 Name : WmiPrvSE.exe MemGB : 146 Name : powershell_ise.exe MemGB : 143 Name : powershell.exe MemGB : 98 17496 Mon Aug 08 15:30:38 2016 stopping 17496 end perfex 31:19    0   3583    3583    Name : SiteScope.exe MemGB : 6568 Name : powershell_ise.exe MemGB : 153 Name : WmiPrvSE.exe MemGB : 146 Name : powershell_ise.exe MemGB : 143 Name : powershell.exe MemGB : 98 17496 Mon Aug 08 15:30:38 2016 stopping 17496 end perfex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried &lt;CODE&gt;Name\s:\s+(?\w+.exe\s\w+\s+:\s\d+)&lt;/CODE&gt; regex which works fine in regex tested, but Splunk is not extracting the fields. I want to use max_match=0 so that it picks all the process name and memory usage. If the rex works fine, it should show result like below,&lt;/P&gt;

&lt;P&gt;SiteScope.exe MemGB : 6568 &lt;BR /&gt;
powershell.exe MemGB : 98&lt;BR /&gt;
WmiPrvSE.exe MemGB : 146&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2016 19:43:32 GMT</pubDate>
    <dc:creator>anoopambli</dc:creator>
    <dc:date>2016-08-08T19:43:32Z</dc:date>
    <item>
      <title>How to edit my regular expression to extract these fields from my sample data using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218624#M64237</link>
      <description>&lt;P&gt;Looking for some help with rex. The raw data looks like this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;value= Name : SiteScope.exe MemGB : 6568 Name : powershell_ise.exe MemGB : 153 Name : WmiPrvSE.exe MemGB : 146 Name : powershell_ise.exe MemGB : 143 Name : powershell.exe MemGB : 98 17496 Mon Aug 08 15:30:38 2016 stopping 17496 end perfex 31:19    0   3583    3583    Name : SiteScope.exe MemGB : 6568 Name : powershell_ise.exe MemGB : 153 Name : WmiPrvSE.exe MemGB : 146 Name : powershell_ise.exe MemGB : 143 Name : powershell.exe MemGB : 98 17496 Mon Aug 08 15:30:38 2016 stopping 17496 end perfex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried &lt;CODE&gt;Name\s:\s+(?\w+.exe\s\w+\s+:\s\d+)&lt;/CODE&gt; regex which works fine in regex tested, but Splunk is not extracting the fields. I want to use max_match=0 so that it picks all the process name and memory usage. If the rex works fine, it should show result like below,&lt;/P&gt;

&lt;P&gt;SiteScope.exe MemGB : 6568 &lt;BR /&gt;
powershell.exe MemGB : 98&lt;BR /&gt;
WmiPrvSE.exe MemGB : 146&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 19:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218624#M64237</guid>
      <dc:creator>anoopambli</dc:creator>
      <dc:date>2016-08-08T19:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regular expression to extract these fields from my sample data using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218625#M64238</link>
      <description>&lt;P&gt;What does your query look like?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 19:48:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218625#M64238</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-08T19:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regular expression to extract these fields from my sample data using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218626#M64239</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex max_match=0 "Name\s+:\s+(?&amp;lt;Process&amp;gt;\S+)\s+MemGB\s+:\s+(?&amp;lt;MemGB&amp;gt;\d+)" | table Process MemGB
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Aug 2016 19:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218626#M64239</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-08T19:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regular expression to extract these fields from my sample data using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218627#M64240</link>
      <description>&lt;P&gt;That worked. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 20:54:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218627#M64240</guid>
      <dc:creator>anoopambli</dc:creator>
      <dc:date>2016-08-08T20:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regular expression to extract these fields from my sample data using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218628#M64241</link>
      <description>&lt;P&gt;It seems the thing you tried didn't have a name to assign the capture group to. Notice in the correct answer (below) that there's a &lt;CODE&gt;&amp;lt;Process&amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;lt;MemGB&amp;gt;&lt;/CODE&gt; after the capture group starts.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 19:05:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-these-fields-from/m-p/218628#M64241</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2016-08-11T19:05:49Z</dc:date>
    </item>
  </channel>
</rss>

