<?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 Inline field extraction with rex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95539#M24661</link>
    <description>&lt;P&gt;I'm not a big regex power yet, I know this is easy, but since it is not on a system I can't test and figure out myself I'm looking for expert assistance.&lt;BR /&gt;
Can someone provide a search rex that will pull both the interface and up-down fields from this log?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Oct  9 12:01:18 hos-a-3550-1.rockefeller.internal 2635634: Oct  9 12:01:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
Oct  9 12:01:18 hos-a-3550-1.rockefeller.internal 2635634: Oct  9 12:01:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Looking for a rex that pulls two fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search | rex field=_raw ?(?&amp;lt;interface&amp;gt;?)?(?&amp;lt;up-down&amp;gt;?)? | stats count by interface,up-down
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;
Luke&lt;/P&gt;</description>
    <pubDate>Sat, 12 Oct 2013 00:43:26 GMT</pubDate>
    <dc:creator>lukejadamec</dc:creator>
    <dc:date>2013-10-12T00:43:26Z</dc:date>
    <item>
      <title>Inline field extraction with rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95539#M24661</link>
      <description>&lt;P&gt;I'm not a big regex power yet, I know this is easy, but since it is not on a system I can't test and figure out myself I'm looking for expert assistance.&lt;BR /&gt;
Can someone provide a search rex that will pull both the interface and up-down fields from this log?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Oct  9 12:01:18 hos-a-3550-1.rockefeller.internal 2635634: Oct  9 12:01:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
Oct  9 12:01:18 hos-a-3550-1.rockefeller.internal 2635634: Oct  9 12:01:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Looking for a rex that pulls two fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search | rex field=_raw ?(?&amp;lt;interface&amp;gt;?)?(?&amp;lt;up-down&amp;gt;?)? | stats count by interface,up-down
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;
Luke&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2013 00:43:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95539#M24661</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-12T00:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Inline field extraction with rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95540#M24662</link>
      <description>&lt;P&gt;please show that you are looking for precisely.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2013 04:56:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95540#M24662</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-10-12T04:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Inline field extraction with rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95541#M24663</link>
      <description>&lt;P&gt;Here &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;mysearch | rex "Interface (?&amp;lt;interface&amp;gt;[^, ]*), changed state to (?&amp;lt;state&amp;gt;\w+)" | table interface state&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2013 16:20:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95541#M24663</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-10-12T16:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Inline field extraction with rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95542#M24664</link>
      <description>&lt;P&gt;Thanks.  I totally need to learn regex.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2013 17:03:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95542#M24664</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-12T17:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inline field extraction with rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95543#M24665</link>
      <description>&lt;P&gt;here is a good place to start&lt;BR /&gt;
&lt;A href="http://www.regular-expressions.info/quickstart.html"&gt;http://www.regular-expressions.info/quickstart.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 16:44:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inline-field-extraction-with-rex/m-p/95543#M24665</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-10-14T16:44:40Z</dc:date>
    </item>
  </channel>
</rss>

