<?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: Identify field command with regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115029#M30431</link>
    <description>&lt;P&gt;Follow the logs:&lt;/P&gt;

&lt;P&gt;Jan 15 11:43:33 10.30.0.43 Jan 15 11:27:08 SRX.com.br mgd[68527]: UI_CMDLINE_READ_LINE: User 'tbrazil', &lt;STRONG&gt;command 'exit '&lt;/STRONG&gt;&lt;BR /&gt;
Jan 15 11:42:23 10.30.0.43 Jan 15 11:25:58 SRX.com.br mgd[68527]: UI_CMDLINE_READ_LINE: User 'tbrazil', &lt;STRONG&gt;command 'commit and-quit '&lt;/STRONG&gt;&lt;BR /&gt;
Jan 15 11:41:55 10.30.0.43 Jan 15 11:25:30 SRX.com.br mgd[68527]: UI_CMDLINE_READ_LINE: User 'tbrazil', &lt;STRONG&gt;command 'commit check '&lt;/STRONG&gt;&lt;BR /&gt;
Jan 15 11:41:49 10.30.0.43 Jan 15 11:25:24 SRX.com.br mgd[68527]: UI_CMDLINE_READ_LINE: User 'tbrazil', &lt;STRONG&gt;command 'set interfaces fe-0/0/7 description multiplan '&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Tks.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:39:52 GMT</pubDate>
    <dc:creator>dfigurello</dc:creator>
    <dc:date>2020-09-28T15:39:52Z</dc:date>
    <item>
      <title>Identify field command with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115027#M30429</link>
      <description>&lt;P&gt;Hey Splunkers, &lt;/P&gt;

&lt;P&gt;Could you help me about identify a field. I don't have experience with regex. In my case I have firewalls log, for example:&lt;/P&gt;

&lt;P&gt;command 'top '&lt;BR /&gt;
command 'delete user teste '&lt;BR /&gt;
command 'edit system login '&lt;BR /&gt;
command 'commit '&lt;BR /&gt;
command 'set login user teste uid 2006 class super-user authentication plain-text-password '&lt;/P&gt;

&lt;P&gt;I want to indentify the field "command"&lt;/P&gt;

&lt;P&gt;command = top &lt;BR /&gt;
command = delete user teste&lt;BR /&gt;
command = edit system login&lt;BR /&gt;
command = commit &lt;/P&gt;

&lt;P&gt;I tried with IFX but not works. Anyone have any idea about that? &lt;/P&gt;

&lt;P&gt;Tks Splunkers. &lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2014 13:29:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115027#M30429</guid>
      <dc:creator>dfigurello</dc:creator>
      <dc:date>2014-01-15T13:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Identify field command with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115028#M30430</link>
      <description>&lt;P&gt;I think you should try this: \'(.*?)\'&lt;/P&gt;

&lt;P&gt;It worked for me! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2014 13:43:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115028#M30430</guid>
      <dc:creator>gfreitas</dc:creator>
      <dc:date>2014-01-15T13:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Identify field command with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115029#M30431</link>
      <description>&lt;P&gt;Follow the logs:&lt;/P&gt;

&lt;P&gt;Jan 15 11:43:33 10.30.0.43 Jan 15 11:27:08 SRX.com.br mgd[68527]: UI_CMDLINE_READ_LINE: User 'tbrazil', &lt;STRONG&gt;command 'exit '&lt;/STRONG&gt;&lt;BR /&gt;
Jan 15 11:42:23 10.30.0.43 Jan 15 11:25:58 SRX.com.br mgd[68527]: UI_CMDLINE_READ_LINE: User 'tbrazil', &lt;STRONG&gt;command 'commit and-quit '&lt;/STRONG&gt;&lt;BR /&gt;
Jan 15 11:41:55 10.30.0.43 Jan 15 11:25:30 SRX.com.br mgd[68527]: UI_CMDLINE_READ_LINE: User 'tbrazil', &lt;STRONG&gt;command 'commit check '&lt;/STRONG&gt;&lt;BR /&gt;
Jan 15 11:41:49 10.30.0.43 Jan 15 11:25:24 SRX.com.br mgd[68527]: UI_CMDLINE_READ_LINE: User 'tbrazil', &lt;STRONG&gt;command 'set interfaces fe-0/0/7 description multiplan '&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Tks.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:39:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115029#M30431</guid>
      <dc:creator>dfigurello</dc:creator>
      <dc:date>2020-09-28T15:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Identify field command with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115030#M30432</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yoursearch&amp;gt;|rex field=_raw "command\s+\'(?&amp;lt;command&amp;gt;.*)\'$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try the above rex. Is there a space after command and ' ? If not then this should work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;yoursearch&amp;gt;|rex field=_raw "command\'(?&amp;lt;command&amp;gt;.*)\'$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jan 2014 15:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115030#M30432</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2014-01-15T15:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Identify field command with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115031#M30433</link>
      <description>&lt;P&gt;Worked! Tks theouhuios!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2014 16:35:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-field-command-with-regex/m-p/115031#M30433</guid>
      <dc:creator>dfigurello</dc:creator>
      <dc:date>2014-01-15T16:35:43Z</dc:date>
    </item>
  </channel>
</rss>

