<?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 Extract field from another field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121843#M32816</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am having a field which has content like below&lt;/P&gt;

&lt;P&gt;abc xyz sksk lsmlmlspmwmlmwpn wonmwm:29299  (abcxmmowmo.wsibi.w) &lt;STRONG&gt;X-Forwarded-For: xxx.xx.xxx.xxx&lt;/STRONG&gt; xyz&lt;/P&gt;

&lt;P&gt;Please note that there is a space between X-Forwarded-For:&amp;lt;space&amp;gt;xxx.xx.xxx.xxx&lt;/P&gt;

&lt;P&gt;I want to extract the value of X-Forwarded-For: and then match it with a list of IPs from a lookup list and finally disregard those logs where this is a match.&lt;/P&gt;

&lt;P&gt;PLease help !!&lt;/P&gt;</description>
    <pubDate>Mon, 25 May 2015 06:16:34 GMT</pubDate>
    <dc:creator>lohit</dc:creator>
    <dc:date>2015-05-25T06:16:34Z</dc:date>
    <item>
      <title>Extract field from another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121843#M32816</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am having a field which has content like below&lt;/P&gt;

&lt;P&gt;abc xyz sksk lsmlmlspmwmlmwpn wonmwm:29299  (abcxmmowmo.wsibi.w) &lt;STRONG&gt;X-Forwarded-For: xxx.xx.xxx.xxx&lt;/STRONG&gt; xyz&lt;/P&gt;

&lt;P&gt;Please note that there is a space between X-Forwarded-For:&amp;lt;space&amp;gt;xxx.xx.xxx.xxx&lt;/P&gt;

&lt;P&gt;I want to extract the value of X-Forwarded-For: and then match it with a list of IPs from a lookup list and finally disregard those logs where this is a match.&lt;/P&gt;

&lt;P&gt;PLease help !!&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2015 06:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121843#M32816</guid>
      <dc:creator>lohit</dc:creator>
      <dc:date>2015-05-25T06:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field from another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121844#M32817</link>
      <description>&lt;P&gt;Hi lohit,&lt;/P&gt;

&lt;P&gt;you can use something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search the get the field | rex field=TheFieldName "X-Forwarded-For:\s(?&amp;lt;myNew&amp;gt;.*)\s" | ....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will create a new field called &lt;CODE&gt;myNew&lt;/CODE&gt;.&lt;BR /&gt;
Also take a look at this page &lt;A href="https://regex101.com"&gt;https://regex101.com&lt;/A&gt; to learn and try regex and as well at the docs about the &lt;CODE&gt;field extractor&lt;/CODE&gt; &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Knowledge/ExtractfieldsinteractivelywithIFX"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/Knowledge/ExtractfieldsinteractivelywithIFX&lt;/A&gt; and learn how to use it. It helps you to get anything out of your events into fields, which then can be used in any further search within the same app.&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2015 06:36:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121844#M32817</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-05-25T06:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field from another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121845#M32818</link>
      <description>&lt;P&gt;Thanks MuS.  I figured it out earlier but with a more complex regex.&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2015 06:59:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121845#M32818</guid>
      <dc:creator>lohit</dc:creator>
      <dc:date>2015-05-25T06:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field from another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121846#M32819</link>
      <description>&lt;P&gt;When you figure out your own answer, the proper thing to to is to answer  your own question here and "Accept" your answer so that other people won't waste time trying to help you when you don't need it and so that others can be helped by your answer.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2015 16:36:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121846#M32819</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-06T16:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field from another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121847#M32820</link>
      <description>&lt;P&gt;Woodcock, if you can see i have already accepted MuS solution to be an answer. My reply was similar to MuS on that. Anywayz thanks for the suggestion.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2015 16:43:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-field-from-another-field/m-p/121847#M32820</guid>
      <dc:creator>lohit</dc:creator>
      <dc:date>2015-06-06T16:43:54Z</dc:date>
    </item>
  </channel>
</rss>

