<?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 How to find two strings from splunk log in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465288#M131091</link>
    <description>&lt;P&gt;Hi @dabroma5&lt;BR /&gt;
you're welcome!&lt;BR /&gt;
Ciao and next time.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 01 Apr 2020 14:58:28 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-04-01T14:58:28Z</dc:date>
    <item>
      <title>RegEx How to find two strings from splunk log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465284#M131087</link>
      <description>&lt;P&gt;I have below log:&lt;/P&gt;

&lt;P&gt;Service ABCD(blabla_blabla): 365.45.1.87.3.60354 -&amp;gt; remote.234.5 Failure&lt;BR /&gt;
Service DERF(blabla_blabla): remote.567.9 -&amp;gt; remote.284.9  Failure&lt;/P&gt;

&lt;P&gt;and would like to catch with RegEx:&lt;/P&gt;

&lt;P&gt;a: 365.45.1.87.3.60354 b: remote.234.5&lt;/P&gt;

&lt;P&gt;a: remote.567.9 b: remote.284.9&lt;/P&gt;

&lt;P&gt;Thanks for help&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:51:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465284#M131087</guid>
      <dc:creator>dabroma5</dc:creator>
      <dc:date>2020-09-30T04:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx How to find two strings from splunk log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465285#M131088</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Check this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval log="Service ABCD(blabla_blabla): 365.45.1.87.3.60354 -&amp;gt; remote.234.5 Failure#Service DERF(blabla_blabla): remote.567.9 -&amp;gt; remote.284.9 Failure" 
| eval temp=split(log,"#") 
| mvexpand temp 
| rex field=temp "\:\s+(?P&amp;lt;a&amp;gt;[^-&amp;gt;]+)\s+-&amp;gt;\s+(?P&amp;lt;b&amp;gt;\S+)" 
| table a b
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Apr 2020 14:20:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465285#M131088</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-04-01T14:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx How to find two strings from splunk log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465286#M131089</link>
      <description>&lt;P&gt;Hi @dabroma5&lt;BR /&gt;
try this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex ":\s+(?&amp;lt;a&amp;gt;[^ ]+)\s+-\&amp;gt;\s+(?&amp;lt;b&amp;gt;[^ ]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/fOwXfs/1"&gt;https://regex101.com/r/fOwXfs/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;if eventually you have some false positive, you could also try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex ":\s+(?&amp;lt;a&amp;gt;[^ ]+)\s+-\&amp;gt;\s+(?&amp;lt;b&amp;gt;[^ ]+)\s+Failure"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/fOwXfs/2"&gt;https://regex101.com/r/fOwXfs/2&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 14:21:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465286#M131089</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-04-01T14:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx How to find two strings from splunk log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465287#M131090</link>
      <description>&lt;P&gt;@gcusello your response was crazy fast! Awesome!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 14:52:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465287#M131090</guid>
      <dc:creator>efavreau</dc:creator>
      <dc:date>2020-04-01T14:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx How to find two strings from splunk log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465288#M131091</link>
      <description>&lt;P&gt;Hi @dabroma5&lt;BR /&gt;
you're welcome!&lt;BR /&gt;
Ciao and next time.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 14:58:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/RegEx-How-to-find-two-strings-from-splunk-log/m-p/465288#M131091</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-04-01T14:58:28Z</dc:date>
    </item>
  </channel>
</rss>

