<?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 extract a string in a variable in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610662#M212372</link>
    <description>&lt;P&gt;what is run here?&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2022 11:41:20 GMT</pubDate>
    <dc:creator>avneet26</dc:creator>
    <dc:date>2022-08-24T11:41:20Z</dc:date>
    <item>
      <title>How to extract a string in a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610308#M212236</link>
      <description>&lt;P&gt;I have a table in which one of the columns has logs like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2022-08-21 23:00:00.877 Warning: PooledThread::run: N4xdmp29ForestCheckSchemaDBChangeTaskE::run: XDMP-XDQPNOSESSION: No XDQP session on host iuserb.nl.eu.abnamro.com, client=iuserb.nl.eu.abnamro.com, request=moreLocators, session=2026168605646879816, target=5301003730415457210&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to extract the term "XDMP-XDQPNOSESSION" into a variable and then later use it. How to do that using regex or any other option ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 09:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610308#M212236</guid>
      <dc:creator>avneet26</dc:creator>
      <dc:date>2022-08-22T09:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a string in a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610312#M212237</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;one way to do it:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... your base query
| rex "(::run:.*)+::run:(?&amp;lt;foo&amp;gt;[^:]+)"&lt;/LI-CODE&gt;&lt;P&gt;Then you have this string on field foo.&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 10:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610312#M212237</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-08-22T10:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a string in a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610319#M212238</link>
      <description>&lt;P&gt;Basically out of my base query, I want to extract this string put it in a variable and then pass it to create an alert e-mail , where-in this string will be passed to the e-mail title. How can I do that?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 10:56:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610319#M212238</guid>
      <dc:creator>avneet26</dc:creator>
      <dc:date>2022-08-22T10:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a string in a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610662#M212372</link>
      <description>&lt;P&gt;what is run here?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 11:41:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610662#M212372</guid>
      <dc:creator>avneet26</dc:creator>
      <dc:date>2022-08-24T11:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a string in a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610665#M212374</link>
      <description>&lt;P&gt;"run" is taken from your example log event - it precedes "&lt;SPAN&gt;XDMP-XDQPNOSESSION" (the string you wanted to extract), but because it appears twice in your example, it needs to appear twice in the rex matching string to anchor the extract.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 11:56:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-in-a-variable/m-p/610665#M212374</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-08-24T11:56:35Z</dc:date>
    </item>
  </channel>
</rss>

