<?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: Splunk Regex for Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Regex-for-Field-Extraction/m-p/223753#M65884</link>
    <description>&lt;P&gt;Try this.  It will extract the modules and times into multi-value fields.  It then combines the fields and breaks them into separate events.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  | rex max_match=0 "\{\"moduleName\":\"(?P&amp;lt;module&amp;gt;[^\"]*).*?\"loadTime\":(?P&amp;lt;loadTime&amp;gt;\d+),\"evalTime\":(?P&amp;lt;evalTime&amp;gt;\d+)}" | eval fields = mvzip(mvzip(module,loadTime),evalTime) | mvexpand fields |...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 14 Sep 2015 20:12:31 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2015-09-14T20:12:31Z</dc:date>
    <item>
      <title>Splunk Regex for Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Regex-for-Field-Extraction/m-p/223750#M65881</link>
      <description>&lt;P&gt;I want to extract fields from the below string(JSON) for:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval time for each javascript (i.e require.min.js)
Load time for each javascript (i.e require.min.js)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"date":"2014-09-14T18:39:45.170Z","level":"INFO","logger":"marker.RESTART","seq":2,"msg":{"message":"load time in milliseconds","data":[{"moduleName":"node_modules/requirejs/require.min.js","startTimestamp":1442255975613,"fileSize":15330,"loadTime":752,"evalTime":27},{"moduleName":"buildjs/hnav.framework.js","startTimestamp":1442255975619,"fileSize":2443141,"loadTime":1737,"evalTime":2126},{"moduleName":"buildjs/hnav.index.js","startTimestamp":1442255975624,"fileSize":487047,"loadTime":950,"evalTime":456}],"packageType":"PROD"},"version":"0.5.10.12","clientIp":"192.168.1.10"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please help me with the regex for it&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2015 19:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Regex-for-Field-Extraction/m-p/223750#M65881</guid>
      <dc:creator>harish0557</dc:creator>
      <dc:date>2015-09-14T19:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex for Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Regex-for-Field-Extraction/m-p/223751#M65882</link>
      <description>&lt;P&gt;Here's some untested regex which will work. Make sure to check the non-matches and see if there's anything left out &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?P&amp;lt;LoadTime&amp;gt;(?=\"loadTime\"\:)\d{2,6})
(?P&amp;lt;evalTime&amp;gt;(?=\"evalTime\"\:)\d{2,6})
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Sep 2015 19:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Regex-for-Field-Extraction/m-p/223751#M65882</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2015-09-14T19:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex for Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Regex-for-Field-Extraction/m-p/223752#M65883</link>
      <description>&lt;P&gt;but i want it for specific modules  like - require.min.js , framework.js, index.js&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2015 19:56:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Regex-for-Field-Extraction/m-p/223752#M65883</guid>
      <dc:creator>harish0557</dc:creator>
      <dc:date>2015-09-14T19:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex for Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Regex-for-Field-Extraction/m-p/223753#M65884</link>
      <description>&lt;P&gt;Try this.  It will extract the modules and times into multi-value fields.  It then combines the fields and breaks them into separate events.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  | rex max_match=0 "\{\"moduleName\":\"(?P&amp;lt;module&amp;gt;[^\"]*).*?\"loadTime\":(?P&amp;lt;loadTime&amp;gt;\d+),\"evalTime\":(?P&amp;lt;evalTime&amp;gt;\d+)}" | eval fields = mvzip(mvzip(module,loadTime),evalTime) | mvexpand fields |...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Sep 2015 20:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Regex-for-Field-Extraction/m-p/223753#M65884</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-09-14T20:12:31Z</dc:date>
    </item>
  </channel>
</rss>

