Getting Data In

Log Pipeline Management - how to convert comma decimal to dot?

fongpen
Path Finder

Hi,

May i know how to convert raw data (cookedvalue) from comma to dot using regex? 

Raw Data in Log Observer

"instanceName","cookedvalue"

"services","87,8477154366277"

 

Result

"instanceName","cookedvalue"

"services","87.8477154366277"

Labels (3)
0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @fongpen,

You can use rex command with sed mode;

| rex mode=sed field=cookedvalue "s/,/./g"
If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma

PickleRick
SplunkTrust
SplunkTrust

I'm wondering how does this compare performancewise to

| eval cookedvalue=replace(cookedvalue,",",".")
0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...