<?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 do 2 parameters rex mode=sed ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237729#M70625</link>
    <description>&lt;P&gt;Use two rex commands.&lt;/P&gt;</description>
    <pubDate>Sat, 08 Oct 2016 20:02:01 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2016-10-08T20:02:01Z</dc:date>
    <item>
      <title>How to do 2 parameters rex mode=sed ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237728#M70624</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;

&lt;P&gt;It's possible 2 parameters rex mode=sed in sequence ? &lt;BR /&gt;
I can change ab for 01 and ac for 02&lt;/P&gt;

&lt;P&gt;I try this, but not work:&lt;BR /&gt;
| rex mode=sed field=_raw "s/ab/01/g;s/ac/02/g"&lt;BR /&gt;
Error: &lt;BR /&gt;
Error in 'rex' command: Failed to initialize sed. Invalid option string: g;s/ac/02/g &lt;/P&gt;

&lt;P&gt;or i need to use 2 rex mode=sed field=_raw  , 1 for change ab for 01and other for change ac for 02 ?&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2016 16:40:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237728#M70624</guid>
      <dc:creator>pgbr7</dc:creator>
      <dc:date>2016-10-08T16:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to do 2 parameters rex mode=sed ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237729#M70625</link>
      <description>&lt;P&gt;Use two rex commands.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2016 20:02:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237729#M70625</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-10-08T20:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to do 2 parameters rex mode=sed ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237730#M70626</link>
      <description>&lt;P&gt;This is not good, because if I need to change 3 or more its very dificult.&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2016 22:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237730#M70626</guid>
      <dc:creator>pgbr7</dc:creator>
      <dc:date>2016-10-08T22:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to do 2 parameters rex mode=sed ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237731#M70627</link>
      <description>&lt;P&gt;Use the rex mode sed command split over two lines rather than writing the code in one single line. Also do not use the &lt;STRONG&gt;;&lt;/STRONG&gt; in between. So basically whatever you were trying to achieve with semicolon in between, achieve it with in same command but split over two lines:&lt;/P&gt;

&lt;PRE&gt;
yourBaseSearch
| rex mode=sed field=_raw "s/ab/01/g
s/ac/02/g"
| stats count by yourField
&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt;  I have removed the semicolon and tricked command to be in multiline&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2016 22:54:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237731#M70627</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-10-08T22:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to do 2 parameters rex mode=sed ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237732#M70628</link>
      <description>&lt;P&gt;Thanks It's working !&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2016 02:44:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237732#M70628</guid>
      <dc:creator>pgbr7</dc:creator>
      <dc:date>2016-10-09T02:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to do 2 parameters rex mode=sed ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237733#M70629</link>
      <description>&lt;P&gt;Also noticed it works with the space:&lt;/P&gt;

&lt;P&gt;| rex mode=sed field=_raw "s/ab/01/g s/ac/02/g"&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 23:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-2-parameters-rex-mode-sed/m-p/237733#M70629</guid>
      <dc:creator>redflexigork</dc:creator>
      <dc:date>2017-09-10T23:17:37Z</dc:date>
    </item>
  </channel>
</rss>

