<?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: Regex for Field Extraction in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Regex-for-Field-Extraction/m-p/78443#M4980</link>
    <description>&lt;P&gt;Have you tried testing this out with the rex command in Splunk with the search language?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=_raw "^(?&amp;lt;subsystem&amp;gt;[^&amp;gt;]+)&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am not sure if that will work if your raw event has anything before the "logsrv&amp;gt;" in the event line such as a timestamp.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2013 00:48:20 GMT</pubDate>
    <dc:creator>Rob</dc:creator>
    <dc:date>2013-06-28T00:48:20Z</dc:date>
    <item>
      <title>Regex for Field Extraction</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Regex-for-Field-Extraction/m-p/78442#M4979</link>
      <description>&lt;P&gt;I've been trying to create a regex to generate a field name without success.  The data I'm attempting to parse looks like:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;logsrv&amp;gt; Message server exiting.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I would like to make logsrv represent a subsystem so that my field is subsystem and logsrv is the data for that field.&lt;/P&gt;

&lt;P&gt;So far I have the following expression that works on a regex tester: &lt;STRONG&gt;^.*?(?=&amp;gt;)&lt;/STRONG&gt;&lt;BR /&gt;
but I'm missing something with Splunk since it won't return any results no matter I try.  The field extractor doesn't have any luck either when I try to create the expression using &lt;STRONG&gt;logsrv&lt;/STRONG&gt; from the results.&lt;/P&gt;

&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 00:42:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Regex-for-Field-Extraction/m-p/78442#M4979</guid>
      <dc:creator>robhorton</dc:creator>
      <dc:date>2013-06-28T00:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Field Extraction</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Regex-for-Field-Extraction/m-p/78443#M4980</link>
      <description>&lt;P&gt;Have you tried testing this out with the rex command in Splunk with the search language?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=_raw "^(?&amp;lt;subsystem&amp;gt;[^&amp;gt;]+)&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am not sure if that will work if your raw event has anything before the "logsrv&amp;gt;" in the event line such as a timestamp.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 00:48:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Regex-for-Field-Extraction/m-p/78443#M4980</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2013-06-28T00:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Field Extraction</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Regex-for-Field-Extraction/m-p/78444#M4981</link>
      <description>&lt;P&gt;Thank you!  You're right.  The data has the timestamp on the previous line and splunk returns results with the time and logsrv combined.&lt;/P&gt;

&lt;P&gt;Data:&lt;BR /&gt;
27-Jun-13 19:34:37&lt;BR /&gt;
logsrv&amp;gt; Message server exiting.&lt;/P&gt;

&lt;P&gt;Result:&lt;BR /&gt;
27-Jun-13 19:34:37 logsrv&lt;/P&gt;

&lt;P&gt;Do I need to search for a preceding carriage return or pattern match the time?&lt;/P&gt;

&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 00:57:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Regex-for-Field-Extraction/m-p/78444#M4981</guid>
      <dc:creator>robhorton</dc:creator>
      <dc:date>2013-06-28T00:57:09Z</dc:date>
    </item>
  </channel>
</rss>

