<?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 select the timestamp and UniqueID in order to create a line graph from it? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-regular-expression-to-select-the-timestamp-and/m-p/267533#M51237</link>
    <description>&lt;P&gt;I'm trying to create a line graph that represents number of requests throughout the day so we can see when we get the most requests. Here's what the log file looks like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;--69036a3a-A--
[27/Oct/2016:14:43:50 --0700] WBJ1FtFyTFUAABdj928AAADJ 
--69036a3a-B--
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That contains the &lt;CODE&gt;[Timestamp] UniqueId&lt;/CODE&gt;. I want to build the graph with the timestamp and then have a drilldown to show what the unique Id if you want to look at a particular request. I wrote this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\W{2}\d{5}\w\d\w\W[A-B]\W{2}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But this selects &lt;CODE&gt;--69036a3a-A--&lt;/CODE&gt; and &lt;CODE&gt;--69036a3a-B--&lt;/CODE&gt; whereas I want it to select what's in between. How do I select that and create a line graph out of it?&lt;/P&gt;

&lt;P&gt;Edit 1: I modified my regex to make it simpler:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[A]\W{2}\n(.*)\n\-\-
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But this selects &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;A--
 [27/Oct/2016:14:43:50 --0700] WBJ1FtFyTFUAABdj928AAADJ 
 --
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Whereas I want to exclude the &lt;CODE&gt;A--&lt;/CODE&gt; and &lt;CODE&gt;--&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2016 17:09:12 GMT</pubDate>
    <dc:creator>sankarms</dc:creator>
    <dc:date>2016-12-07T17:09:12Z</dc:date>
    <item>
      <title>How to edit my regular expression to select the timestamp and UniqueID in order to create a line graph from it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-regular-expression-to-select-the-timestamp-and/m-p/267533#M51237</link>
      <description>&lt;P&gt;I'm trying to create a line graph that represents number of requests throughout the day so we can see when we get the most requests. Here's what the log file looks like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;--69036a3a-A--
[27/Oct/2016:14:43:50 --0700] WBJ1FtFyTFUAABdj928AAADJ 
--69036a3a-B--
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That contains the &lt;CODE&gt;[Timestamp] UniqueId&lt;/CODE&gt;. I want to build the graph with the timestamp and then have a drilldown to show what the unique Id if you want to look at a particular request. I wrote this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\W{2}\d{5}\w\d\w\W[A-B]\W{2}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But this selects &lt;CODE&gt;--69036a3a-A--&lt;/CODE&gt; and &lt;CODE&gt;--69036a3a-B--&lt;/CODE&gt; whereas I want it to select what's in between. How do I select that and create a line graph out of it?&lt;/P&gt;

&lt;P&gt;Edit 1: I modified my regex to make it simpler:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[A]\W{2}\n(.*)\n\-\-
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But this selects &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;A--
 [27/Oct/2016:14:43:50 --0700] WBJ1FtFyTFUAABdj928AAADJ 
 --
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Whereas I want to exclude the &lt;CODE&gt;A--&lt;/CODE&gt; and &lt;CODE&gt;--&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 17:09:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-regular-expression-to-select-the-timestamp-and/m-p/267533#M51237</guid>
      <dc:creator>sankarms</dc:creator>
      <dc:date>2016-12-07T17:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regular expression to select the timestamp and UniqueID in order to create a line graph from it?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-regular-expression-to-select-the-timestamp-and/m-p/267534#M51238</link>
      <description>&lt;P&gt;If using this in props.conf to extract field named "uniqueID"&lt;BR /&gt;
Use this: &lt;CODE&gt;(?ism)\[.+]\s+(?P&amp;lt;uniqueID&amp;gt;\S+)&lt;/CODE&gt;&lt;BR /&gt;
To do this in search bar, use:&lt;BR /&gt;
Your search ... &lt;CODE&gt;| rex field=_raw "(?ism)\[.+]\s+(?P&amp;lt;uniqueID&amp;gt;\S+)"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Remove single tic marks for each example above.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 17:28:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-regular-expression-to-select-the-timestamp-and/m-p/267534#M51238</guid>
      <dc:creator>sshelly_splunk</dc:creator>
      <dc:date>2016-12-07T17:28:47Z</dc:date>
    </item>
  </channel>
</rss>

