<?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: Need regex to extract specific data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361908#M106922</link>
    <description>&lt;P&gt;Output is "ABCD failure Date", I need output without "Date", any suggestion?&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jun 2017 22:32:25 GMT</pubDate>
    <dc:creator>ninadbhaskarwar</dc:creator>
    <dc:date>2017-06-22T22:32:25Z</dc:date>
    <item>
      <title>Need regex to extract specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361905#M106919</link>
      <description>&lt;P&gt;I need a regex to get the output as below - &lt;/P&gt;

&lt;P&gt;Input&lt;BR /&gt;
/ABCD/Safe+Alert+-+ABCD+failure Date: Jun 01,2017&lt;BR /&gt;
/ABCD / Safe +Alert+-+Xyjw%28s%29+not+working Date: Jun 21,2017&lt;/P&gt;

&lt;P&gt;Output&lt;BR /&gt;
ABCD failure&lt;BR /&gt;&lt;BR /&gt;
Xyjw not working&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 18:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361905#M106919</guid>
      <dc:creator>ninadbhaskarwar</dc:creator>
      <dc:date>2017-06-22T18:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need regex to extract specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361906#M106920</link>
      <description>&lt;P&gt;Try like this (run anywhere sample, replace first 2 line with your search, and update the field names per yours)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval temp="/ABCD/Safe+Alert+-+ABCD+failure Date: Jun 01,2017##/ABCD / Safe +Alert+-+Xyjw%28s%29+not+working Date: Jun 21,2017" | table temp | makemv temp delim="##" | mvexpand temp 
| eval temp=urldecode(temp) | rex field=temp "Alert\s*-\s*(?&amp;lt;YourField&amp;gt;[^\:]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Updated Answer&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval temp="/ABCD/Safe+Alert+-+ABCD+failure Date: Jun 01,2017##/ABCD / Safe +Alert+-+Xyjw%28s%29+not+working Date: Jun 21,2017" | table temp | makemv temp delim="##" | mvexpand temp 
| eval temp=urldecode(temp) | rex field=temp "Alert\s*-\s*(?&amp;lt;YourField&amp;gt;.+)\sDate\:"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jun 2017 19:03:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361906#M106920</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-22T19:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need regex to extract specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361907#M106921</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults |eval raw="/ABCD/Safe+Alert+-+ABCD+failure Date: Jun 01,2017
/ABCD / Safe +Alert+-+Xyjw%28s%29+not+working Date: Jun 21,2017"
| makemv delim="
" raw
| mvexpand raw
| rename raw AS _raw

| rename COMMENT AS "Everything above generates sample event data; everything below is your solution"

| eval output=_raw
| rex field=output mode=sed "s%^/([^/]+)/(?:[^+]*\+){4}(.*) Date.*$%\1 \2% s/\+/ /g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jun 2017 19:07:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361907#M106921</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-22T19:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need regex to extract specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361908#M106922</link>
      <description>&lt;P&gt;Output is "ABCD failure Date", I need output without "Date", any suggestion?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 22:32:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361908#M106922</guid>
      <dc:creator>ninadbhaskarwar</dc:creator>
      <dc:date>2017-06-22T22:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need regex to extract specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361909#M106923</link>
      <description>&lt;P&gt;Try my answer.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 08:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361909#M106923</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-23T08:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need regex to extract specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361910#M106924</link>
      <description>&lt;P&gt;Hi I have already tried your solution but output for second line is&lt;/P&gt;

&lt;P&gt;"&lt;STRONG&gt;ABCD&lt;/STRONG&gt; not working" where as I was expecting  "&lt;STRONG&gt;Xyjw&lt;/STRONG&gt; not working"&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 15:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361910#M106924</guid>
      <dc:creator>ninadbhaskarwar</dc:creator>
      <dc:date>2017-06-23T15:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need regex to extract specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361911#M106925</link>
      <description>&lt;P&gt;Try the updated answer.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 16:07:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361911#M106925</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-23T16:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need regex to extract specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361912#M106926</link>
      <description>&lt;P&gt;Try the updated answer by @somesoni2 &lt;span class="lia-unicode-emoji" title=":grinning_squinting_face:"&gt;😆&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 16:12:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361912#M106926</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-23T16:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need regex to extract specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361913#M106927</link>
      <description>&lt;P&gt;ARGH!  I grabbed the wrong &lt;CODE&gt;ABCD&lt;/CODE&gt;!  I will update; hang on...&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 16:17:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-regex-to-extract-specific-data/m-p/361913#M106927</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-23T16:17:21Z</dc:date>
    </item>
  </channel>
</rss>

