<?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: Regex help! in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322621#M96317</link>
    <description>&lt;P&gt;Yes, I could have accommodated it but I figured it was a mistake/typo.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Feb 2017 07:54:38 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-02-23T07:54:38Z</dc:date>
    <item>
      <title>Regex help!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322617#M96313</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;How to extract the Ips from the below windows event both Client IP-1 and Client Ip-2 &lt;/P&gt;

&lt;P&gt;02/22/2017 09:05:24 AM&lt;BR /&gt;
LogName=Security&lt;BR /&gt;
SourceName=AD FS Auditing&lt;BR /&gt;
EventCode=411&lt;BR /&gt;
EventType=0&lt;BR /&gt;
Type=Information&lt;BR /&gt;
ComputerName=ADSFS.ab.com&lt;BR /&gt;
User=add&lt;BR /&gt;
Sid=1244&lt;BR /&gt;
SidType=1&lt;BR /&gt;
TaskCategory=None&lt;BR /&gt;
OpCode=Info&lt;BR /&gt;
RecordNumber=4033770&lt;BR /&gt;
Keywords=Audit Failure, Classic&lt;BR /&gt;
Message=Token validation failed. See inner exception for more details. &lt;/P&gt;

&lt;P&gt;Additional Data &lt;/P&gt;

&lt;P&gt;Activity ID: 00000000-0000-0000-0000-000000000000 &lt;/P&gt;

&lt;P&gt;Token Type: &lt;BR /&gt;
&lt;A href="http://schemas.microsoft.com/ws/2006/05/identitymodel/tokens/UserName"&gt;http://schemas.microsoft.com/ws/2006/05/identitymodel/tokens/UserName&lt;/A&gt;  &lt;/P&gt;

&lt;P&gt;Client IP: &lt;BR /&gt;
133.44.55.20.81,122.333.44.55. &lt;/P&gt;

&lt;P&gt;Error message: &lt;BR /&gt;
&lt;A href="mailto:kiran@ab.com"&gt;kiran@ab.com&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;Exception details: &lt;BR /&gt;
System.IdentityModel.Tokens.SecurityTokenValidationException: &lt;A href="mailto:kiran@ab.com"&gt;kiran@ab.com&lt;/A&gt;&lt;BR /&gt;
   at Microsoft.IdentityServer.Service.Tokens.MSISWindowsUserNameSecurityTokenHandler.ValidateToken(SecurityToken token)&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 15:17:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322617#M96313</guid>
      <dc:creator>kiran331</dc:creator>
      <dc:date>2017-02-22T15:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322618#M96314</link>
      <description>&lt;P&gt;Is this what you're looking for?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "(IP\:\s+|\d+\,)(?P&amp;lt;ClientIP&amp;gt;.*)."
| makemv delim="," ClientIP 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should extract the IPs and separate them into their own values.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 16:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322618#M96314</guid>
      <dc:creator>adayton20</dc:creator>
      <dc:date>2017-02-22T16:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322619#M96315</link>
      <description>&lt;P&gt;Like this (for IPV4):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex max_match=0 "Client\s+IP:[\r\n\s\d\.\,]*(?&amp;lt;!\d)(?&amp;lt;Client_IP&amp;gt;\d+\.\d+\.\d+\.\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I do note that you have an IPV5 IP in your example???&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 16:04:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322619#M96315</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-02-22T16:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322620#M96316</link>
      <description>&lt;P&gt;If IPV5 is in play, then you probably want &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | rex max_match=0 "Client\s+IP:[\r\n\s\d\.\,]*(?&amp;lt;!\d)(?&amp;lt;Client_IP&amp;gt;\d+\.\d+\.\d+\.\d+(\.\d+)?)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | rex max_match=0 "Client\s+IP:[\r\n\s\d\.\,]*(?&amp;lt;!\d)(?&amp;lt;Client_IP&amp;gt;\d+(\.\d+){3,4})"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Feb 2017 17:07:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322620#M96316</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-22T17:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322621#M96317</link>
      <description>&lt;P&gt;Yes, I could have accommodated it but I figured it was a mistake/typo.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 07:54:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/322621#M96317</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-02-23T07:54:38Z</dc:date>
    </item>
  </channel>
</rss>

