<?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 3 characters after a given string in Splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624199#M217017</link>
    <description>&lt;P&gt;In that case, the code provided above should suffice. (You should have a field named barvalue. &amp;nbsp;Correct?)&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2022 08:10:10 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2022-12-14T08:10:10Z</dc:date>
    <item>
      <title>How to extract 3 characters after a given string in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624194#M217012</link>
      <description>&lt;P&gt;I want to extract the two characters 78 from the barvalue&amp;nbsp; and have it in a separate column in my table:-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;deltavalue = 890(11%) sigmavalue=334(56%) barvalue=445(78%)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 07:40:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624194#M217012</guid>
      <dc:creator>avneet26</dc:creator>
      <dc:date>2022-12-14T07:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract 3 characters after a given string in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624196#M217014</link>
      <description>&lt;P&gt;Your title says 3 characters, yet the opening sentence says 2 characters. &amp;nbsp;Which is it? &amp;nbsp;Also, are you trying to extract all 2-character strings before the percent sign (%) or only the last one? &amp;nbsp;Specifics are very important when you ask data questions.&lt;/P&gt;&lt;P&gt;Assuming that you only want the last percentage, you can do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=barvalue "\(?&amp;lt;barpercent&amp;gt;\d+)%\)"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 14 Dec 2022 07:57:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624196#M217014</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-12-14T07:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract 3 characters after a given string in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624198#M217016</link>
      <description>&lt;P&gt;Ah my bad. sorry not three characters. only two numbers i want which is 78&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 08:07:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624198#M217016</guid>
      <dc:creator>avneet26</dc:creator>
      <dc:date>2022-12-14T08:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract 3 characters after a given string in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624199#M217017</link>
      <description>&lt;P&gt;In that case, the code provided above should suffice. (You should have a field named barvalue. &amp;nbsp;Correct?)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 08:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624199#M217017</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-12-14T08:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract 3 characters after a given string in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624202#M217019</link>
      <description>&lt;P&gt;barvalue is the search string in my _raw field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 08:34:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624202#M217019</guid>
      <dc:creator>avneet26</dc:creator>
      <dc:date>2022-12-14T08:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract 3 characters after a given string in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624203#M217020</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228691"&gt;@avneet26&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;barvalue is the search string in my _raw field.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Are you the admin? If not, you should ask them to make sure obvious key-value pairs are extracted; in fact, unless there is any special settings, Splunk extracts "a=b" in _raw as value "b" assigned to field "a". by default. &amp;nbsp;With that, my first code should give you a new field &lt;FONT face="andale mono,times"&gt;barpercent&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;But if your admin is uncooperative, you can do something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "barvalue=\d+\((?&amp;lt;barpercent&amp;gt;\d+)%\)"&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 08:46:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-3-characters-after-a-given-string-in-Splunk/m-p/624203#M217020</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-12-14T08:46:40Z</dc:date>
    </item>
  </channel>
</rss>

