<?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 do I get my rex search to extract a string between two strings from a sample below  and concat it with the fixed string &amp;quot;751.&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-my-rex-search-to-extract-a-string-between-two/m-p/373828#M109922</link>
    <description>&lt;P&gt;Another way is this (assuming your current input string is available as field &lt;CODE&gt;input&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search | eval output=replace(input,"^(.*)(\d+)-(\d+)(\s*:.+)$","751.\3")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Oct 2017 13:43:04 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-10-04T13:43:04Z</dc:date>
    <item>
      <title>How do I get my rex search to extract a string between two strings from a sample below  and concat it with the fixed string "751."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-my-rex-search-to-extract-a-string-between-two/m-p/373826#M109920</link>
      <description>&lt;P&gt;Example1 &lt;/P&gt;

&lt;P&gt;Input:  352322648-1112 : D_SSPP-HNW_SD-AVI&lt;BR /&gt;
Output i want :  "751.1112"&lt;/P&gt;

&lt;P&gt;Example2 &lt;/P&gt;

&lt;P&gt;Input: 335587620-43300 : DEMO&lt;BR /&gt;
Output i want: "751.43300"&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-my-rex-search-to-extract-a-string-between-two/m-p/373826#M109920</guid>
      <dc:creator>Veeruswathi</dc:creator>
      <dc:date>2020-09-29T16:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get my rex search to extract a string between two strings from a sample below  and concat it with the fixed string "751."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-my-rex-search-to-extract-a-string-between-two/m-p/373827#M109921</link>
      <description>&lt;P&gt;Here's one way.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "Input: \d+-(?&amp;lt;field&amp;gt;\d+)" | eval newField="751.".field | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 12:26:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-my-rex-search-to-extract-a-string-between-two/m-p/373827#M109921</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-10-04T12:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get my rex search to extract a string between two strings from a sample below  and concat it with the fixed string "751."</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-my-rex-search-to-extract-a-string-between-two/m-p/373828#M109922</link>
      <description>&lt;P&gt;Another way is this (assuming your current input string is available as field &lt;CODE&gt;input&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search | eval output=replace(input,"^(.*)(\d+)-(\d+)(\s*:.+)$","751.\3")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 13:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-my-rex-search-to-extract-a-string-between-two/m-p/373828#M109922</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-10-04T13:43:04Z</dc:date>
    </item>
  </channel>
</rss>

