<?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: How to split and retrieve a value  ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362500#M163989</link>
    <description>&lt;P&gt;it will extract into "field1".. which you can use in the search&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2018 12:43:51 GMT</pubDate>
    <dc:creator>p_gurav</dc:creator>
    <dc:date>2018-01-04T12:43:51Z</dc:date>
    <item>
      <title>How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362495#M163984</link>
      <description>&lt;P&gt;I think we may need regex for this  and I am not good at it.&lt;BR /&gt;
I need to be able to extract the last part i.e. (TMNT-1752)  from the below string . In some cases the numeric part could be three or more digits too like CMNU-112 or NT=1223 etc or TURC-12223. I think I want the part that comes after selectedIssue=.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://phut.mayhem.com/secure/JapidJoard.jspa?rapidView=12339&amp;amp;view=detail&amp;amp;selectedIssue=TMNT-1752"&gt;https://phut.mayhem.com/secure/JapidJoard.jspa?rapidView=12339&amp;amp;view=detail&amp;amp;selectedIssue=TMNT-1752&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:27:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362495#M163984</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T12:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362496#M163985</link>
      <description>&lt;P&gt;Hi @zacksoft,&lt;/P&gt;

&lt;P&gt;Please try &lt;CODE&gt;&amp;lt;yourBasesearch&amp;gt; | rex ".*=(?&amp;lt;value&amp;gt;.*)"&lt;/CODE&gt; this will extract &lt;CODE&gt;TMNT-1752&lt;/CODE&gt; into new field &lt;CODE&gt;value&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Here is run anywhere search, first 2 lines generating dummy data only.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="https://phut.mayhem.com/secure/JapidJoard.jspa?rapidView=12339&amp;amp;view=detail&amp;amp;pelectedIkkue=TMNT-1752" 
| rex ".*=(?&amp;lt;value&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:34:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362496#M163985</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-01-04T12:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362497#M163986</link>
      <description>&lt;P&gt;Hi zacksoft,&lt;/P&gt;

&lt;P&gt;In example string is "pelectedIkkue=" constant? If yes then you can try below one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "selectedIssue\=(?P&amp;lt;field1&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:37:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362497#M163986</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-01-04T12:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362498#M163987</link>
      <description>&lt;P&gt;Yes, that is constant. The only value that changes is 'TMNT-1752'. It could be something like ABC-1233 or ABFD-121 etc...&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:39:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362498#M163987</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T12:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362499#M163988</link>
      <description>&lt;P&gt;If I try this , where will it extract  TMNT-1752 to ?&lt;BR /&gt;
I need to able to use  the value  and put it in a table.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362499#M163988</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T12:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362500#M163989</link>
      <description>&lt;P&gt;it will extract into "field1".. which you can use in the search&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362500#M163989</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-01-04T12:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362501#M163990</link>
      <description>&lt;P&gt;There is another "=" sign before "rapidView". But I don't want that value. I only want the last one that comes after 'selectedIssue='&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:43:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362501#M163990</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T12:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362502#M163991</link>
      <description>&lt;P&gt;Can you please post your full event instead of part of event so that we can write regex properly.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:46:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362502#M163991</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-01-04T12:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362503#M163992</link>
      <description>&lt;P&gt;@p_gurav&lt;BR /&gt;
Actually it's not _raw. The entire string itself is stored in a field caleld "url".&lt;BR /&gt;
What changes do I make for that ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:46:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362503#M163992</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T12:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362504#M163993</link>
      <description>&lt;P&gt;Then used below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rex field=url "selectedIssue\=(?P&amp;lt;field1&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:49:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362504#M163993</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-01-04T12:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362505#M163994</link>
      <description>&lt;P&gt;The string itself is extracted from _raw and stored in a field called 'url'.&lt;BR /&gt;
And url field is as follows. I need the string that is present after 'selectedIssue='&lt;/P&gt;

&lt;P&gt;&lt;A href="https://phut.mayhem.com/secure/JapidJoard.jspa?rapidView=12339&amp;amp;view=detail&amp;amp;selectedIssue=TMNT-1752"&gt;https://phut.mayhem.com/secure/JapidJoard.jspa?rapidView=12339&amp;amp;view=detail&amp;amp;selectedIssue=TMNT-1752&lt;/A&gt;" &lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362505#M163994</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T12:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362506#M163995</link>
      <description>&lt;P&gt;A small change ... I see in some of the strings there are some values that are present after TMNT-1752 and they begin with '&amp;amp;' and that messes up the extract.  Can I filter those ?&lt;/P&gt;

&lt;P&gt;Example : &lt;A href="https://phut.mayhem.com/secure/JapidJoard.jspa?rapidView=12339&amp;amp;view=detail&amp;amp;selectedIssue=TMNT-1752&amp;amp;myReq=1234somethingsomething"&gt;https://phut.mayhem.com/secure/JapidJoard.jspa?rapidView=12339&amp;amp;view=detail&amp;amp;selectedIssue=TMNT-1752&amp;amp;myReq=1234somethingsomething&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The current query's output is "TMNT-1752&amp;amp;myReq=1234somethingsomething"&lt;/P&gt;

&lt;P&gt;Can we just get the part present between "selectedIssue="  and "&amp;amp;"&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:57:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362506#M163995</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T12:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362507#M163996</link>
      <description>&lt;P&gt;Then try this, It will create field called &lt;CODE&gt;value&lt;/CODE&gt; which you can use in search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | rex field=url "selectedIssue\=(?&amp;lt;value&amp;gt;(([^\&amp;amp;]+)|(.+)))" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    | rex field=_raw "selectedIssue\=(?&amp;lt;value&amp;gt;(([^\&amp;amp;]+)|(.+)))" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:02:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362507#M163996</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-01-04T13:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362508#M163997</link>
      <description>&lt;P&gt;Hi man,&lt;/P&gt;

&lt;P&gt;This should work for you :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | rex field=url "selectedIssue\=(?&amp;lt;value&amp;gt;[^\&amp;amp;]+)" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362508#M163997</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2018-01-04T13:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362509#M163998</link>
      <description>&lt;P&gt;What if the string I am looking for is between "selected=" and "&amp;amp;"&lt;/P&gt;

&lt;P&gt;example : selectedIssue=TWNT1752&amp;amp;&lt;BR /&gt;
                   selectedDefect=TMNT1752&lt;BR /&gt;
                 selectedGarfi=TMNT1234&lt;BR /&gt;
                  selectedEpic=TMNT1234 &lt;/P&gt;

&lt;P&gt;How do I extract it ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362509#M163998</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T13:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362510#M163999</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you try this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | rex field=url "selected\w+=(?&amp;lt;value&amp;gt;(([^\&amp;amp;]+)|(.+)))"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | rex field=_raw "selected\w+=(?&amp;lt;value&amp;gt;(([^\&amp;amp;]+)|(.+)))"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:39:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362510#M163999</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-01-04T13:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362511#M164000</link>
      <description>&lt;P&gt;Thanks @p_gurav&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:45:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362511#M164000</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T13:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362512#M164001</link>
      <description>&lt;P&gt;Welcome. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:47:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362512#M164001</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-01-04T13:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362513#M164002</link>
      <description>&lt;P&gt;Ah from what I read I saw you needed selected issue only.&lt;/P&gt;

&lt;P&gt;Simplest form is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | rex field=url "selected\w+=(?&amp;lt;value&amp;gt;[^\&amp;amp;]+)" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362513#M164002</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2018-01-04T13:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to split and retrieve a value  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362514#M164003</link>
      <description>&lt;P&gt;Hi @,&lt;BR /&gt;
I think the regex above should work for you but still if it's not you can try below regex.&lt;BR /&gt;
index=xyz | rex field=url "\"(selected\w+)\"&lt;EM&gt;[=]*(?P(([^&amp;amp;]+)|(.+)))\"&lt;/EM&gt;" &lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 14:16:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-and-retrieve-a-value/m-p/362514#M164003</guid>
      <dc:creator>nikita_p</dc:creator>
      <dc:date>2018-01-04T14:16:08Z</dc:date>
    </item>
  </channel>
</rss>

