<?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 content between two strings? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296623#M89478</link>
    <description>&lt;P&gt;... | rex "(?SQL\d+N)\s*(?.+)\s*SQLSTATE=(?\d+)"&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 14:10:20 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2020-09-29T14:10:20Z</dc:date>
    <item>
      <title>How to extract content between two strings?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296619#M89474</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;I have an error message coming up in Splunk like below. The required log message will come in the middle of the line and i have to extract the content which lies between SQL0911N  &amp;amp; SQLSTATE=40001 . &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;********* SQL0911N  ##############.  SQLSTATE=40001
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can you please help us to write rex to extract the fields in between the 2 strings. Please let me know if need more information.&lt;/P&gt;

&lt;P&gt;Thanks &amp;amp; Regards&lt;BR /&gt;
Senthamilselvan J&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 17:22:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296619#M89474</guid>
      <dc:creator>senthamilselvan</dc:creator>
      <dc:date>2017-05-16T17:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract content between two strings?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296620#M89475</link>
      <description>&lt;P&gt;If those strings (SQL0911N &amp;amp; SQLSTATE=40001) are static/fixed, try like this for inline extraction in search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex "SQL0911N\s*(?&amp;lt;YourFieldName&amp;gt;.+)\s*SQLSTATE=40001"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 May 2017 18:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296620#M89475</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-05-16T18:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract content between two strings?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296621#M89476</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "SQL\d+N\s*(?&amp;lt;YouFieldNameHere&amp;gt;.+)\s*SQLSTATE=\d+"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 May 2017 19:16:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296621#M89476</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-16T19:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract content between two strings?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296622#M89477</link>
      <description>&lt;P&gt;Thank you!! As of now we are getting output excluding the key values (SQL\d+N\s &amp;amp; SQLSTATE=\d+). But i want to display both the key values in the error message as well. Please let me know the rex to includes the key values also.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 09:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296622#M89477</guid>
      <dc:creator>senthamilselvan</dc:creator>
      <dc:date>2017-05-22T09:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract content between two strings?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296623#M89478</link>
      <description>&lt;P&gt;... | rex "(?SQL\d+N)\s*(?.+)\s*SQLSTATE=(?\d+)"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:10:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296623#M89478</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-09-29T14:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract content between two strings?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296624#M89479</link>
      <description>&lt;P&gt;Hi Woodcock,&lt;/P&gt;

&lt;P&gt;The search query is not working as expected, Still i am getting message excluding the two key values(SQL\d+N\s &amp;amp; SQLSTATE=\d).&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 13:52:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-content-between-two-strings/m-p/296624#M89479</guid>
      <dc:creator>senthamilselvan</dc:creator>
      <dc:date>2017-05-26T13:52:57Z</dc:date>
    </item>
  </channel>
</rss>

