I have a field which has leading 0's before the actual value. How can I get rid of them.
Possible Values
0000000040671.80
-0000000020231.15
The field may contain the sign '-' for some of its values which I want to retain
Is there a better way than extracting a sign to a different field and the actual value without 0's into another field and then concatenating it?
You might be able to use eval with ltrim(X,Y). Take a look at the info here:
http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/Commonevalfunctions
It would definitely handle the positive values. The negative ones need to be handled as well, but I think a well constructed eval could handle it.
You might be able to use eval with ltrim(X,Y). Take a look at the info here:
http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/Commonevalfunctions
It would definitely handle the positive values. The negative ones need to be handled as well, but I think a well constructed eval could handle it.