<?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 Regex field extraction question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction-question/m-p/371032#M109176</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have this log format for extracting&lt;/P&gt;

&lt;P&gt;Sep 01 09:55:11 @ipdest HSL: @ip1:port1 &amp;lt;-&amp;gt; @ip2:port2 | @ip3:port3 &amp;lt;-&amp;gt; @ip4:port4&lt;/P&gt;

&lt;P&gt;REGEX = (?\S+\s+\d+ \d+:\d+:\d+) (?\d+.\d+.\d+.\d+)[^[]HSL: (?&amp;lt;@ip1&amp;gt;\d+.\d+.\d+.\d+):(?\S+) &amp;lt;-&amp;gt; (?&amp;lt;@ip2&amp;gt;\d+.\d+.\d+.\d+):(?\S+) | (?&amp;lt;@ip3&amp;gt;\d+.\d+.\d+.\d+):(?\S+) &amp;lt;-&amp;gt; (?&amp;lt;@ip4&amp;gt;\d+.\d+.\d+.\d+):(?\S+)&lt;/P&gt;

&lt;P&gt;I would like to extract everything , but in my results, all fields were exctracted except whose after pipe | (@ip3:port3 &amp;lt;-&amp;gt; @ip4:port4).&lt;BR /&gt;
Any help much appreciated.&lt;BR /&gt;
Thankyou.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2017 09:19:51 GMT</pubDate>
    <dc:creator>MAMAOUI</dc:creator>
    <dc:date>2017-11-15T09:19:51Z</dc:date>
    <item>
      <title>Regex field extraction question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction-question/m-p/371032#M109176</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have this log format for extracting&lt;/P&gt;

&lt;P&gt;Sep 01 09:55:11 @ipdest HSL: @ip1:port1 &amp;lt;-&amp;gt; @ip2:port2 | @ip3:port3 &amp;lt;-&amp;gt; @ip4:port4&lt;/P&gt;

&lt;P&gt;REGEX = (?\S+\s+\d+ \d+:\d+:\d+) (?\d+.\d+.\d+.\d+)[^[]HSL: (?&amp;lt;@ip1&amp;gt;\d+.\d+.\d+.\d+):(?\S+) &amp;lt;-&amp;gt; (?&amp;lt;@ip2&amp;gt;\d+.\d+.\d+.\d+):(?\S+) | (?&amp;lt;@ip3&amp;gt;\d+.\d+.\d+.\d+):(?\S+) &amp;lt;-&amp;gt; (?&amp;lt;@ip4&amp;gt;\d+.\d+.\d+.\d+):(?\S+)&lt;/P&gt;

&lt;P&gt;I would like to extract everything , but in my results, all fields were exctracted except whose after pipe | (@ip3:port3 &amp;lt;-&amp;gt; @ip4:port4).&lt;BR /&gt;
Any help much appreciated.&lt;BR /&gt;
Thankyou.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 09:19:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction-question/m-p/371032#M109176</guid>
      <dc:creator>MAMAOUI</dc:creator>
      <dc:date>2017-11-15T09:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regex field extraction question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction-question/m-p/371033#M109177</link>
      <description>&lt;P&gt;The &lt;CODE&gt;|&lt;/CODE&gt; character acts as an &lt;CODE&gt;OR&lt;/CODE&gt; in regex.  If you would like to match a literal &lt;CODE&gt;|&lt;/CODE&gt; escape it: &lt;CODE&gt;\|&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;REGEX = (?\S+\s+\d+ \d+:\d+:\d+) (?\d+.\d+.\d+.\d+)[^[]HSL: (?&amp;lt;@ip1&amp;gt;\d+.\d+.\d+.\d+):(?\S+) &amp;lt;-&amp;gt; (?&amp;lt;@ip2&amp;gt;\d+.\d+.\d+.\d+):(?\S+) \| (?&amp;lt;@ip3&amp;gt;\d+.\d+.\d+.\d+):(?\S+) &amp;lt;-&amp;gt; (?&amp;lt;@ip4&amp;gt;\d+.\d+.\d+.\d+):(?\S+)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 13:02:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction-question/m-p/371033#M109177</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-11-15T13:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Regex field extraction question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction-question/m-p/371034#M109178</link>
      <description>&lt;P&gt;You also better escape the periods in your IP addresses - &lt;CODE&gt;\.&lt;/CODE&gt;. A period will match &lt;STRONG&gt;almost any&lt;/STRONG&gt; character of not escaped. Depending on your data, that could be a problem, but likely in this case it won't. But it will parse more quickly if you escape them, which is a side benefit.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 13:14:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction-question/m-p/371034#M109178</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-11-15T13:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regex field extraction question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction-question/m-p/371035#M109179</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;

&lt;P&gt;Thank you, It works now,I added the \ before the |.&lt;/P&gt;

&lt;P&gt;Meryem&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 14:03:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-field-extraction-question/m-p/371035#M109179</guid>
      <dc:creator>MAMAOUI</dc:creator>
      <dc:date>2017-11-15T14:03:34Z</dc:date>
    </item>
  </channel>
</rss>

