<?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 Help with regex search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/156946#M44159</link>
    <description>&lt;P&gt;Good Afternoon,&lt;/P&gt;

&lt;P&gt;I would like to use a regex search to get "Inbound TCP connection denied" and "High".  What's the correct regex command to pull these out of the CEF event.  Also, I'll eventually would like to create a table showing how many "High", "Medium", "Low" events show up in the last hour.&lt;/P&gt;

&lt;P&gt;Jul 24 11:32:11 host-host-h05 CEF:0|CISCO|ASA||106001|Inbound TCP connection denied|High| eventId=1247891 &lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jul 2014 21:45:35 GMT</pubDate>
    <dc:creator>jhampton3rd</dc:creator>
    <dc:date>2014-07-24T21:45:35Z</dc:date>
    <item>
      <title>Help with regex search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/156946#M44159</link>
      <description>&lt;P&gt;Good Afternoon,&lt;/P&gt;

&lt;P&gt;I would like to use a regex search to get "Inbound TCP connection denied" and "High".  What's the correct regex command to pull these out of the CEF event.  Also, I'll eventually would like to create a table showing how many "High", "Medium", "Low" events show up in the last hour.&lt;/P&gt;

&lt;P&gt;Jul 24 11:32:11 host-host-h05 CEF:0|CISCO|ASA||106001|Inbound TCP connection denied|High| eventId=1247891 &lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2014 21:45:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/156946#M44159</guid>
      <dc:creator>jhampton3rd</dc:creator>
      <dc:date>2014-07-24T21:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/156947#M44160</link>
      <description>&lt;P&gt;I don't think you want &lt;CODE&gt;regex&lt;/CODE&gt; - if what you want to do is to extract the data into a field, you want &lt;CODE&gt;rex&lt;/CODE&gt;. For example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| rex "(?:.*?\|){5}(?&amp;lt;message&amp;gt;.*?)\|(?&amp;lt;level&amp;gt;.*?)\|"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives you two fields &lt;CODE&gt;message&lt;/CODE&gt; and &lt;CODE&gt;level&lt;/CODE&gt;. It assumes that there are 5 &lt;CODE&gt;|&lt;/CODE&gt; (pipe) symbols before the message string and that the fields are delimited with additional &lt;CODE&gt;|&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;You could get the table by doing this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| rex "(?:.*?\|){5}(?&amp;lt;message&amp;gt;.*?)\|(?&amp;lt;level&amp;gt;.*?)\|"
| stats count by level
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jul 2014 22:41:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/156947#M44160</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-07-24T22:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/156948#M44161</link>
      <description>&lt;P&gt;Thanks lguinn.  Big Help!!!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 12:30:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/156948#M44161</guid>
      <dc:creator>jhampton3rd</dc:creator>
      <dc:date>2014-07-25T12:30:21Z</dc:date>
    </item>
  </channel>
</rss>

