<?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 What is the regular expression to replace a dash '-' in a string with a period '.' in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289448#M87584</link>
    <description>&lt;P&gt;12-000-000-222 &lt;/P&gt;

&lt;P&gt;for the above IP address, i want to change it to 12.000.000.222. pls help. &lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2017 20:55:16 GMT</pubDate>
    <dc:creator>shivac</dc:creator>
    <dc:date>2017-02-07T20:55:16Z</dc:date>
    <item>
      <title>What is the regular expression to replace a dash '-' in a string with a period '.'</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289448#M87584</link>
      <description>&lt;P&gt;12-000-000-222 &lt;/P&gt;

&lt;P&gt;for the above IP address, i want to change it to 12.000.000.222. pls help. &lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 20:55:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289448#M87584</guid>
      <dc:creator>shivac</dc:creator>
      <dc:date>2017-02-07T20:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regular expression to replace a dash '-' in a string with a period '.'</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289449#M87585</link>
      <description>&lt;P&gt;the sedcmd syntax is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;s/-/./g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Will that work for you?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 21:24:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289449#M87585</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-02-07T21:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regular expression to replace a dash '-' in a string with a period '.'</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289450#M87586</link>
      <description>&lt;P&gt;Try this, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search .. | rex mode=sed field=&amp;lt;your_field&amp;gt; "s/-/./g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;|stats c | eval field="12-000-000-222" | table field | rex mode=sed field=field "s/-/./g"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 21:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289450#M87586</guid>
      <dc:creator>vasanthmss</dc:creator>
      <dc:date>2017-02-07T21:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regular expression to replace a dash '-' in a string with a period '.'</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289451#M87587</link>
      <description>&lt;P&gt;FYI, Options, other than &lt;CODE&gt;sed&lt;/CODE&gt; are,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;....| eval YourIPField=replace(YourIPField,"-",".")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;not so good method&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| replace"*-*-*-*" with "*.*.*.*" in YourIPField
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Feb 2017 21:41:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289451#M87587</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-07T21:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regular expression to replace a dash '-' in a string with a period '.'</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289452#M87588</link>
      <description>&lt;P&gt;@shivac - Looks like you have a few possible solutions to your question. If one of them provided a working solution, please don't forget to click "Accept" below the best answer to resolve this post. If you still need help, please leave a comment. Don’t forget to upvote anything that was helpful too. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2017 17:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-replace-a-dash-in-a-string/m-p/289452#M87588</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2017-03-11T17:32:06Z</dc:date>
    </item>
  </channel>
</rss>

