<?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: tr like command? Phone Numbers different format in 2 data sources and I want to Join them in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/tr-like-command-Phone-Numbers-different-format-in-2-data-sources/m-p/90795#M23326</link>
    <description>&lt;P&gt;Thanks!&lt;BR /&gt;
That helps. I am going to try something like this&lt;BR /&gt;
| rex mode=sed "s/(/""/g" | rex mode=sed  "s/) /"-"/g"&lt;BR /&gt;
Will update here if it works!&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jan 2013 16:27:08 GMT</pubDate>
    <dc:creator>rkirkw</dc:creator>
    <dc:date>2013-01-17T16:27:08Z</dc:date>
    <item>
      <title>tr like command? Phone Numbers different format in 2 data sources and I want to Join them</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tr-like-command-Phone-Numbers-different-format-in-2-data-sources/m-p/90793#M23324</link>
      <description>&lt;P&gt;Is there anything like the UNIX tr command in splunk?&lt;/P&gt;

&lt;P&gt;In one data source I have phone numbers like (800) 555-4444 and in another data source the phone numbers are formatted like 800-555-4444.  I would like to do a join between these two data sources on the phone number but cannot as they do not match.&lt;/P&gt;

&lt;P&gt;It could look like this:&lt;BR /&gt;
echo "(800) 555-4444" | tr -d "()" | tr " " -  &lt;/P&gt;

&lt;P&gt;outputs 800-555-4444&lt;/P&gt;

&lt;P&gt;So other than using sed, awk or tr on the data before it gets to splunk can this be done on the fly?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2013 13:29:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tr-like-command-Phone-Numbers-different-format-in-2-data-sources/m-p/90793#M23324</guid>
      <dc:creator>rkirkw</dc:creator>
      <dc:date>2013-01-17T13:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: tr like command? Phone Numbers different format in 2 data sources and I want to Join them</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tr-like-command-Phone-Numbers-different-format-in-2-data-sources/m-p/90794#M23325</link>
      <description>&lt;P&gt;You could have a look at these section in the manual for making the changes before indexing&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.1/Data/Anonymizedatausingconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.1/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;or you can do it at search time with combinations of &lt;CODE&gt;eval&lt;/CODE&gt; and &lt;CODE&gt;rex&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eval"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eval&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2013 13:39:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tr-like-command-Phone-Numbers-different-format-in-2-data-sources/m-p/90794#M23325</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-01-17T13:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: tr like command? Phone Numbers different format in 2 data sources and I want to Join them</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tr-like-command-Phone-Numbers-different-format-in-2-data-sources/m-p/90795#M23326</link>
      <description>&lt;P&gt;Thanks!&lt;BR /&gt;
That helps. I am going to try something like this&lt;BR /&gt;
| rex mode=sed "s/(/""/g" | rex mode=sed  "s/) /"-"/g"&lt;BR /&gt;
Will update here if it works!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2013 16:27:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tr-like-command-Phone-Numbers-different-format-in-2-data-sources/m-p/90795#M23326</guid>
      <dc:creator>rkirkw</dc:creator>
      <dc:date>2013-01-17T16:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: tr like command? Phone Numbers different format in 2 data sources and I want to Join them</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tr-like-command-Phone-Numbers-different-format-in-2-data-sources/m-p/90796#M23327</link>
      <description>&lt;P&gt;This worked well &lt;BR /&gt;
| rex mode=sed "s/(/""/g" | rex mode=sed "s/ ) /"-"/g"&lt;BR /&gt;
It converted (888) 555-4444 to 888-555-4444&lt;BR /&gt;
Probably be faster in transforms.conf.&lt;BR /&gt;
Now, does it really work for a join?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 19:25:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tr-like-command-Phone-Numbers-different-format-in-2-data-sources/m-p/90796#M23327</guid>
      <dc:creator>rkirkw</dc:creator>
      <dc:date>2013-01-22T19:25:05Z</dc:date>
    </item>
  </channel>
</rss>

