<?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: Problem with removing spaces using sed - with &amp;lt;&amp;gt; characters present in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-removing-spaces-using-sed-with-lt-gt-characters/m-p/490601#M83864</link>
    <description>&lt;P&gt;@Ttreb ,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=your_field_name mode=sed "s/&amp;gt;\s+&amp;lt;//g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Nov 2019 04:54:56 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2019-11-18T04:54:56Z</dc:date>
    <item>
      <title>Problem with removing spaces using sed - with &lt;&gt; characters present</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-removing-spaces-using-sed-with-lt-gt-characters/m-p/490600#M83863</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Update&amp;gt; &amp;lt;data&amp;gt; &amp;lt;user&amp;gt; &amp;lt;dialogs&amp;gt;/finesse/api/User/72741/Dialogs&amp;lt;/dialogs&amp;gt; &amp;lt;extension&amp;gt;&amp;lt;/extension&amp;gt; &amp;lt;firstName&amp;gt;Bert&amp;lt;/firstName&amp;gt; &amp;lt;lastName&amp;gt;Smith&amp;lt;/lastName&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Trying to remove the spaces between &amp;gt; and &amp;lt; &lt;/P&gt;

&lt;P&gt;I have tried the following - several of the patterns I have tried work fine on REgex testing sites but fail for use in Splunk&lt;/P&gt;

&lt;P&gt;I started using ZZ just as a marker to see what effect the replace was having as using &amp;gt;&amp;lt; seems to fail in any use. I checked and the charaters &amp;gt;&amp;lt; are not regex special characters &lt;/P&gt;

&lt;P&gt;| rex field=myraw mode=sed "s/(&amp;gt; &amp;lt;)/ZZ/g"        - No effect&lt;/P&gt;

&lt;P&gt;| rex field=myraw mode=sed "s/(\W \W)/ZZ/g"   - inconsistent replaces &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;notification&amp;gt;&amp;lt;Update&amp;gt;ZZ&amp;lt;data&amp;gt;ZZZZuser&amp;gt;ZZZZ &amp;lt;dialogs&amp;gt;/finesse/api/User/72741/Dialogs&amp;lt;/dialogs&amp;gt;ZZZZ &amp;lt;extension&amp;gt;511835&amp;lt;/extension&amp;gt;ZZZZ &amp;lt;firstName&amp;gt;Bert&amp;lt;/firstName&amp;gt;ZZZZ &amp;lt;lastName&amp;gt;Smith&amp;lt;/lastName&amp;gt;ZZZZ 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;| rex field=myraw mode=sed "s/\x{3e} \x{3c}/ZZ/g"   - no effect&lt;/P&gt;

&lt;P&gt;Not sure now whether Splunk has issues with &amp;lt;&amp;gt; or what - its confusing that I can get this to work in several ways testing on regex sites.&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 03:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-removing-spaces-using-sed-with-lt-gt-characters/m-p/490600#M83863</guid>
      <dc:creator>Ttreb</dc:creator>
      <dc:date>2019-11-18T03:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with removing spaces using sed - with &lt;&gt; characters present</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-removing-spaces-using-sed-with-lt-gt-characters/m-p/490601#M83864</link>
      <description>&lt;P&gt;@Ttreb ,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=your_field_name mode=sed "s/&amp;gt;\s+&amp;lt;//g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Nov 2019 04:54:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-removing-spaces-using-sed-with-lt-gt-characters/m-p/490601#M83864</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-11-18T04:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with removing spaces using sed - with &lt;&gt; characters present</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-removing-spaces-using-sed-with-lt-gt-characters/m-p/490602#M83865</link>
      <description>&lt;P&gt;Thanks for the response that does the trick - was driving me batty trying to work out - just couldn't nail the right pattern.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 05:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-removing-spaces-using-sed-with-lt-gt-characters/m-p/490602#M83865</guid>
      <dc:creator>Ttreb</dc:creator>
      <dc:date>2019-11-18T05:04:46Z</dc:date>
    </item>
  </channel>
</rss>

