<?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: rex in sed mode to replace special chartacter in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482089#M135072</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="hr$D362$processing"
| appendpipe
    [eval _raw="long$trip"]
    | eval foo=split(_raw,"$")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, folks.&lt;BR /&gt;
Simply, use &lt;CODE&gt;split()&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 19 Jan 2020 10:54:19 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-01-19T10:54:19Z</dc:date>
    <item>
      <title>rex in sed mode to replace special chartacter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482084#M135067</link>
      <description>&lt;P&gt;Good morning&lt;BR /&gt;
I need to replace special characters with a line return command but I am having difficulty getting the rex  mode=sed working correctly -&lt;/P&gt;

&lt;P&gt;example foo fields&lt;BR /&gt;&lt;BR /&gt;
hr$D362$processing&lt;BR /&gt;
long$trip&lt;/P&gt;

&lt;P&gt;| rex field=foo mode=sed "s/(".+?$.+?")/\n/g"&lt;/P&gt;

&lt;P&gt;Many thanks for any help you could provide&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 10:16:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482084#M135067</guid>
      <dc:creator>ChrisCLewis</dc:creator>
      <dc:date>2019-09-17T10:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: rex in sed mode to replace special chartacter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482085#M135068</link>
      <description>&lt;P&gt;@ChrisCLewis &lt;/P&gt;

&lt;P&gt;Can you please try this rex command?&lt;BR /&gt;
&lt;CODE&gt;| rex field=foo mode=sed "s/\$/\n/g"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Sample Search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval foo="hr$D362$processing" | rex field=foo mode=sed "s/\$/\n/g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Sep 2019 11:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482085#M135068</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-09-17T11:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: rex in sed mode to replace special chartacter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482086#M135069</link>
      <description>&lt;P&gt;Good afternoon, &lt;/P&gt;

&lt;P&gt;thank you for your reply.&lt;/P&gt;

&lt;P&gt;It is changing the $ to a space rather than a line return&lt;BR /&gt;
showing&lt;BR /&gt;
hr D362 processing&lt;/P&gt;

&lt;P&gt;hoping for:&lt;BR /&gt;
hr&lt;BR /&gt;
D362&lt;BR /&gt;
processing&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 12:24:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482086#M135069</guid>
      <dc:creator>ChrisCLewis</dc:creator>
      <dc:date>2019-09-17T12:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: rex in sed mode to replace special chartacter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482087#M135070</link>
      <description>&lt;P&gt;It's working for me. Please check. &lt;A href="https://imgur.com/a/q0w7ZjL"&gt;https://imgur.com/a/q0w7ZjL&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Can you please share your full search with masking confidential values?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 12:52:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482087#M135070</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-09-17T12:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: rex in sed mode to replace special chartacter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482088#M135071</link>
      <description>&lt;P&gt;index=foobar &lt;BR /&gt;
|eval s1= section.";".Name.";".Code &lt;BR /&gt;
|eval s2=crit.";".critname &lt;/P&gt;

&lt;P&gt;|stats  values(Number) as Number  by s2 s1&lt;BR /&gt;
| rex field=s2 mode=sed "s/\;/\n/g"&lt;BR /&gt;
| rex field=s1 mode=sed "s/\;/\n/g"&lt;BR /&gt;
|chart values(Number) over sepa2  by sepa useother=f usenull=f&lt;/P&gt;

&lt;P&gt;Interestingly when I 'inspect' the graph it looks like there is a line break but splunk is showing it as a space in the chart&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 13:52:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482088#M135071</guid>
      <dc:creator>ChrisCLewis</dc:creator>
      <dc:date>2019-09-17T13:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: rex in sed mode to replace special chartacter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482089#M135072</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="hr$D362$processing"
| appendpipe
    [eval _raw="long$trip"]
    | eval foo=split(_raw,"$")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, folks.&lt;BR /&gt;
Simply, use &lt;CODE&gt;split()&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 10:54:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482089#M135072</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-19T10:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: rex in sed mode to replace special chartacter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482090#M135073</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=foobar 
| eval s1= section.";".Name.";".Code 
| eval s2=crit.";".critname 
| stats values(Number) as Number by s2 s1 
| eval s2 = split(s2,";"), s1 = split(s1,";") 
| chart values(Number) as Number over s2 by s1 useother=f usenull=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is for search query.&lt;BR /&gt;
I see the multiple values ​​are automatically expanded.&lt;BR /&gt;
great!&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 11:01:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-in-sed-mode-to-replace-special-chartacter/m-p/482090#M135073</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-19T11:01:47Z</dc:date>
    </item>
  </channel>
</rss>

