Splunk Search

Converting default table numeric format to Italy ( convert .(dot) values to ,(comma) values in table rows)

balachandar
Engager

Hi,

My current requirement is showing the table values in Italy numeric format instead of default American format. I mean instead of dot(.) as decimal separator I have to replace it with comma(,) Example: 14.260410 should be shown as 14,260410

I have modified the default locale in i18n.py from en-US to it_IT and restarted splunk but it didn't help.

Any help would be appreciated.

Thanks
Bala

0 Karma

mayurr98
Super Champion

Try this:

| rex field=_raw mode=sed "s/\./,/"

And let know what output you get!
This will work only if 14.260410 comes at the start of the event.
If this is not working properly then give me a sample full event.

0 Karma

Elsurion
Communicator

Hi Bala

I've done it with this way:

| eval usedkb=tostring(usedkb, "commas") 
| rex field=usedkb mode=sed "s/,/'/g"
| rex field=usedkb mode=sed "s/\./,/g"

First to eliminate the 1,000 comma to any other char and then replace the . to ,

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...