<?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 rex field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137340#M37623</link>
    <description>&lt;P&gt;I am getting familiar with splunk commands, trying to extract hostname from an extracted field called monitor_name. monitor_name field data look like this,&lt;/P&gt;

&lt;P&gt;[Linux][FWA Electronic Channel Messaging][l91oma1][Process][SS][/fiwlspoma4/was/INSTANCE1/profiles/base/servers/server1][error] &lt;BR /&gt;
[Linux][Baseline][vlrtp569][Process][OSWatcher][SiSExclude] &lt;BR /&gt;
[Linux][Baseline][vlrtp123][Process][srmclient][SiSExclude] &lt;/P&gt;

&lt;P&gt;I would like to extract l91oma1, vlrtp569,vlrtp123 from the above field using rex command. Can someone help me with the regular expression.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:16:39 GMT</pubDate>
    <dc:creator>anoopambli</dc:creator>
    <dc:date>2020-09-28T18:16:39Z</dc:date>
    <item>
      <title>rex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137340#M37623</link>
      <description>&lt;P&gt;I am getting familiar with splunk commands, trying to extract hostname from an extracted field called monitor_name. monitor_name field data look like this,&lt;/P&gt;

&lt;P&gt;[Linux][FWA Electronic Channel Messaging][l91oma1][Process][SS][/fiwlspoma4/was/INSTANCE1/profiles/base/servers/server1][error] &lt;BR /&gt;
[Linux][Baseline][vlrtp569][Process][OSWatcher][SiSExclude] &lt;BR /&gt;
[Linux][Baseline][vlrtp123][Process][srmclient][SiSExclude] &lt;/P&gt;

&lt;P&gt;I would like to extract l91oma1, vlrtp569,vlrtp123 from the above field using rex command. Can someone help me with the regular expression.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:16:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137340#M37623</guid>
      <dc:creator>anoopambli</dc:creator>
      <dc:date>2020-09-28T18:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: rex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137341#M37624</link>
      <description>&lt;P&gt;use this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=_raw "^(?:[^\[\n]*\[){3}(?P&amp;lt;fieldname&amp;gt;\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Nov 2014 16:19:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137341#M37624</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2014-11-28T16:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: rex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137342#M37625</link>
      <description>&lt;P&gt;@kml_uvce your escaping backslashes were lost since you forgot to use the "code" tags around your regex. The regex should actually look like below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=_raw "^(?:[^\[\n]*[){3}(?P&amp;lt;fieldname&amp;gt;w+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Nov 2014 18:33:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137342#M37625</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2014-11-28T18:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: rex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137343#M37626</link>
      <description>&lt;P&gt;And there is backslash missing before "w+" as well. So it should be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=_raw "^(?:[^\[\n]*[){3}(?P&amp;lt;fieldname&amp;gt;\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Nov 2014 19:39:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137343#M37626</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-11-28T19:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: rex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137344#M37627</link>
      <description>&lt;P&gt;Thanks everyone,  that helped me.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2014 09:02:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137344#M37627</guid>
      <dc:creator>anoopambli</dc:creator>
      <dc:date>2014-12-01T09:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: rex field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137345#M37628</link>
      <description>&lt;P&gt;Hi anoopambli&lt;/P&gt;

&lt;P&gt;This search code work well &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...................................|rex max_match=0 field=_raw "\[Linux\]\[[a-zA-Z\s+]+\]\[(?&amp;lt;monitor_name&amp;gt;[^\]]+)\]"|mvexpand monitor_name|table monitor_name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Look at my result&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/167iD1561A2C56C3FA55/image-size/large?v=v2&amp;amp;px=999" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2016 15:12:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-field-extraction/m-p/137345#M37628</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2016-12-11T15:12:18Z</dc:date>
    </item>
  </channel>
</rss>

