<?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: i want to remove all the word starts with OBJ and till 1-3453221. the number will be dynamic and constant in length . we need to remove from string based on OBJ with length in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341093#M101135</link>
    <description>&lt;P&gt;My original answer does cut to the first space.  Can you give more specifics about what it does wrong?&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2017 13:49:25 GMT</pubDate>
    <dc:creator>Richfez</dc:creator>
    <dc:date>2017-06-09T13:49:25Z</dc:date>
    <item>
      <title>i want to remove all the word starts with OBJ and till 1-3453221. the number will be dynamic and constant in length . we need to remove from string based on OBJ with length</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341088#M101130</link>
      <description>&lt;P&gt;this is word obj:1-324dfs32 hello world obj:1-3453221 as a god&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 10:24:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341088#M101130</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-06-09T10:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: i want to remove all the word starts with OBJ and till 1-3453221. the number will be dynamic and constant in length . we need to remove from string based on OBJ with length</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341089#M101131</link>
      <description>&lt;P&gt;Using "obj:1-324dfs32 hello world obj:1-3453221 as a god"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex mode=sed "s/obj\S+//g" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should trim it to "hello world  as a god"&lt;/P&gt;

&lt;P&gt;The formatting of your example could be better, but that's probably the key thing above.  It says to 's' substitute, whenever you find '/obj\S+' or the string "obj" followed by non-spaces, instead insert the characters "nothing" (there's nothing between the two &lt;CODE&gt;//&lt;/CODE&gt; slashes for the substitution, globally &lt;CODE&gt;/g&lt;/CODE&gt; (do it multiple times in one string, don't just do it the first time it sees it and stops).&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 12:15:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341089#M101131</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-06-09T12:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: i want to remove all the word starts with OBJ and till 1-3453221. the number will be dynamic and constant in length . we need to remove from string based on OBJ with length</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341090#M101132</link>
      <description>&lt;P&gt;it worked but it is timing other fields. i want it to cut with length only obj:1-3453221&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 12:55:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341090#M101132</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-06-09T12:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: i want to remove all the word starts with OBJ and till 1-3453221. the number will be dynamic and constant in length . we need to remove from string based on OBJ with length</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341091#M101133</link>
      <description>&lt;P&gt;otherwise we can cut with first space as space delimiter &lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 12:58:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341091#M101133</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-06-09T12:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: i want to remove all the word starts with OBJ and till 1-3453221. the number will be dynamic and constant in length . we need to remove from string based on OBJ with length</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341092#M101134</link>
      <description>&lt;P&gt;Sure, so you want to trim just that many characters - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex mode=sed "s/obj.{10}//g" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That says to find the string "obj" followed by precisely &lt;CODE&gt;{10}&lt;/CODE&gt; of any character (&lt;CODE&gt;.&lt;/CODE&gt; )   Obviously change the 10 to whatever you need, but I think it's about right.&lt;/P&gt;

&lt;P&gt;If that's not quite right, can you provide a few more examples and &lt;EM&gt;exactly&lt;/EM&gt; what you need each example to have as its output?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 13:00:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341092#M101134</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-06-09T13:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: i want to remove all the word starts with OBJ and till 1-3453221. the number will be dynamic and constant in length . we need to remove from string based on OBJ with length</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341093#M101135</link>
      <description>&lt;P&gt;My original answer does cut to the first space.  Can you give more specifics about what it does wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 13:49:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341093#M101135</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-06-09T13:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: i want to remove all the word starts with OBJ and till 1-3453221. the number will be dynamic and constant in length . we need to remove from string based on OBJ with length</title>
      <link>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341094#M101136</link>
      <description>&lt;P&gt;thanks. it's worked. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 13:49:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/i-want-to-remove-all-the-word-starts-with-OBJ-and-till-1-3453221/m-p/341094#M101136</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2017-06-09T13:49:53Z</dc:date>
    </item>
  </channel>
</rss>

