<?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/351632#M104083</link>
    <description>&lt;P&gt;Hi kiran331,&lt;BR /&gt;
Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search | rex field=source "ciscoasa\/(?&amp;lt;host&amp;gt;[^\/]*)" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can test it at &lt;A href="https://regex101.com/r/wrL9Ze/1"&gt;https://regex101.com/r/wrL9Ze/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2017 06:26:14 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-06-13T06:26:14Z</dc:date>
    <item>
      <title>regex help!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/351630#M104081</link>
      <description>&lt;P&gt;How to extract the IP OR hostname from the field "source"?&lt;/P&gt;

&lt;P&gt;source=/opt/var/log/splunk/ciscoasa/11.12.22.345/2017_06_05_21_cisco.log&lt;BR /&gt;
source=/opt/var/log/splunk/ciscoasa/abc_xyz/2017_06_05_21_cisco.log&lt;/P&gt;

&lt;P&gt;I need to extract 11.12.22.345 &amp;amp; abc_xyz&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:29:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/351630#M104081</guid>
      <dc:creator>kiran331</dc:creator>
      <dc:date>2020-09-29T14:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: regex help!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/351631#M104082</link>
      <description>&lt;P&gt;Hi Kiran, Verified and this works fine - &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;source="ciscoasa.txt" | rex field=_raw "ciscoasa\/(?&amp;lt;ipAddress&amp;gt;.*)\/" | table ipAddress _raw&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3079i93DEAB87199C765F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 02:58:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/351631#M104082</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-06-13T02:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: regex help!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/351632#M104083</link>
      <description>&lt;P&gt;Hi kiran331,&lt;BR /&gt;
Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search | rex field=source "ciscoasa\/(?&amp;lt;host&amp;gt;[^\/]*)" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can test it at &lt;A href="https://regex101.com/r/wrL9Ze/1"&gt;https://regex101.com/r/wrL9Ze/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 06:26:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/351632#M104083</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-06-13T06:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: regex help!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/351633#M104084</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;because I was bored I made this redundant answer.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearch | rex field=source "(?&amp;lt;host&amp;gt;[^\/]+)\/[^\/]+(?:$)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Jun 2017 12:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/351633#M104084</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2017-06-13T12:46:49Z</dc:date>
    </item>
  </channel>
</rss>

