<?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 How to change phone number format in splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554264#M157332</link>
    <description>&lt;P&gt;how can we change the phone number format. i used sed mod it is working fine but i want to store the formatted phone number in separate variable,&lt;/P&gt;&lt;P&gt;for ex:&amp;nbsp; 123-123-1234 to 1231231234&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be highly appreciated. Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jun 2021 12:22:56 GMT</pubDate>
    <dc:creator>ajees_basha</dc:creator>
    <dc:date>2021-06-03T12:22:56Z</dc:date>
    <item>
      <title>How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554264#M157332</link>
      <description>&lt;P&gt;how can we change the phone number format. i used sed mod it is working fine but i want to store the formatted phone number in separate variable,&lt;/P&gt;&lt;P&gt;for ex:&amp;nbsp; 123-123-1234 to 1231231234&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be highly appreciated. Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:22:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554264#M157332</guid>
      <dc:creator>ajees_basha</dc:creator>
      <dc:date>2021-06-03T12:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554265#M157333</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;any help will be highly appreciated&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:25:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554265#M157333</guid>
      <dc:creator>ajees_basha</dc:creator>
      <dc:date>2021-06-03T12:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554270#M157334</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226406"&gt;@ajees_basha&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;you have phone numbers in format&amp;nbsp;&lt;SPAN&gt;123-123-1234: three groups divided by "-";&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;you want to store the three groups in three fields (e.g. ph1, ph2 and ph3);&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;then you want to store the full number (without "-") in a field called e.g. "phone";&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;is it correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this is your need, try something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1 
| eval orig_num="123-123-1234"
| rex field=orig_num "^(?&amp;lt;ph1&amp;gt;\w+)-(?&amp;lt;ph2&amp;gt;\w+)-(?&amp;lt;ph3&amp;gt;\w+)"
| rex field=orig_num mode=sed "s/-//g"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:37:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554270#M157334</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-06-03T12:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554272#M157335</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226406"&gt;@ajees_basha&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try by updating props.cof also.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[YOUR_SOURCE_TYPE]
EVAL-new_phone_number = replace(phone_number,"-","")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:39:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554272#M157335</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-03T12:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554273#M157336</link>
      <description>&lt;P&gt;Do you want to do this at ingestion or at search time?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:40:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554273#M157336</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-03T12:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554276#M157337</link>
      <description>&lt;P&gt;If you used &lt;FONT face="courier new,courier"&gt;sed&lt;/FONT&gt; successfully, then you have what you need.&amp;nbsp; Just use &lt;FONT face="courier new,courier"&gt;eval&lt;/FONT&gt; to copy the field then use &lt;FONT face="courier new,courier"&gt;sed&lt;/FONT&gt; to format the copy and now you have the formatted number in a separate "variable".&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:43:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554276#M157337</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-06-03T12:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554278#M157338</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; yes i want to remove the hyphens(-) between phone number and store the formatted number(without hyphen) in a separate variable&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:49:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554278#M157338</guid>
      <dc:creator>ajees_basha</dc:creator>
      <dc:date>2021-06-03T12:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554280#M157339</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; at search time&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:00:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554280#M157339</guid>
      <dc:creator>ajees_basha</dc:creator>
      <dc:date>2021-06-03T13:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554283#M157340</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226406"&gt;@ajees_basha&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;is mine or one of the other answers good for you?&lt;/P&gt;&lt;P&gt;Tell us if you need more help, otherwise, please, accept one answer for the other people of Community.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:03:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554283#M157340</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-06-03T13:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554292#M157341</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;Thank you. sorry to bother you..just one quick doubt is there a way we change the number from&amp;nbsp;&lt;/P&gt;&lt;P&gt;1234567890 to 123-456-7890&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554292#M157341</guid>
      <dc:creator>ajees_basha</dc:creator>
      <dc:date>2021-06-03T13:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to change phone number format in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554299#M157342</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226406"&gt;@ajees_basha&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in this case you have to do the opporite operation using the substr option in the eval command, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1
| eval my_field="1234567890"
| eval phone=substr(my_field,1,3)."-".substr(my_field,4,3)."-".substr(my_field,7,4)
| table phone&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-phone-number-format-in-splunk/m-p/554299#M157342</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-06-03T13:58:09Z</dc:date>
    </item>
  </channel>
</rss>

