<?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: How to extract first ip from &amp;quot;http_x_forwarded_for=&amp;quot;222.xx.xx.xx, 122.211.xx.xx&amp;quot; using rex in splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-first-ip-from-quot-http-x-forwarded-for-quot-222/m-p/649936#M224704</link>
    <description>&lt;P&gt;|rex "(?im)\w+&lt;SPAN&gt;\=\"&lt;/SPAN&gt;(?P&amp;lt;&lt;SPAN&gt;http_x_forwarded_for&lt;/SPAN&gt;&amp;gt;.[^\,]+)"&lt;BR /&gt;&lt;BR /&gt;or else&lt;BR /&gt;|rex "(?im)\w+&lt;SPAN&gt;\=\"&lt;/SPAN&gt;(?P&amp;lt;&lt;SPAN&gt;http_x_forwarded_for&lt;/SPAN&gt;&amp;gt;\d+\.\d+\.\d+\.\d+)"&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jul 2023 07:54:32 GMT</pubDate>
    <dc:creator>santoshneelam</dc:creator>
    <dc:date>2023-07-11T07:54:32Z</dc:date>
    <item>
      <title>How to extract first ip from "http_x_forwarded_for="222.xx.xx.xx, 122.211.xx.xx" using rex in Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-first-ip-from-quot-http-x-forwarded-for-quot-222/m-p/649935#M224703</link>
      <description>&lt;P&gt;here is field "http_x_forwarded_for="222.xx.xx.xx, 122.211.xx.xx"&lt;/P&gt;
&lt;P&gt;i have try:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| rex field=_raw "http_x_forwarded_for\s*=\s*(?&amp;lt;ip_address&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;[^,\s]&lt;/SPAN&gt;&lt;SPAN&gt;+)" &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| &lt;/SPAN&gt;&lt;SPAN class=""&gt;table&lt;/SPAN&gt;&lt;SPAN&gt; ip_address&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;But it not works, pls help !&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 14:40:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-first-ip-from-quot-http-x-forwarded-for-quot-222/m-p/649935#M224703</guid>
      <dc:creator>minhquannguyen7</dc:creator>
      <dc:date>2023-07-11T14:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract first ip from "http_x_forwarded_for="222.xx.xx.xx, 122.211.xx.xx" using rex in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-first-ip-from-quot-http-x-forwarded-for-quot-222/m-p/649936#M224704</link>
      <description>&lt;P&gt;|rex "(?im)\w+&lt;SPAN&gt;\=\"&lt;/SPAN&gt;(?P&amp;lt;&lt;SPAN&gt;http_x_forwarded_for&lt;/SPAN&gt;&amp;gt;.[^\,]+)"&lt;BR /&gt;&lt;BR /&gt;or else&lt;BR /&gt;|rex "(?im)\w+&lt;SPAN&gt;\=\"&lt;/SPAN&gt;(?P&amp;lt;&lt;SPAN&gt;http_x_forwarded_for&lt;/SPAN&gt;&amp;gt;\d+\.\d+\.\d+\.\d+)"&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 07:54:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-first-ip-from-quot-http-x-forwarded-for-quot-222/m-p/649936#M224704</guid>
      <dc:creator>santoshneelam</dc:creator>
      <dc:date>2023-07-11T07:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract first ip from "http_x_forwarded_for="222.xx.xx.xx, 122.211.xx.xx" using rex in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-first-ip-from-quot-http-x-forwarded-for-quot-222/m-p/649945#M224707</link>
      <description>&lt;P&gt;thanks you &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225680"&gt;@santoshneelam&lt;/a&gt; !&amp;nbsp; i want extract in the different log with any field look like this , what shoud i do ???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 10:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-first-ip-from-quot-http-x-forwarded-for-quot-222/m-p/649945#M224707</guid>
      <dc:creator>minhquannguyen7</dc:creator>
      <dc:date>2023-07-11T10:00:30Z</dc:date>
    </item>
  </channel>
</rss>

