I am using OpenRefine and have values like:
33.469.444 or 3.333.444
which I want to convert to:
33469.444 or 3333.444
So I want to remove the first dot (".") in every word.
Anyone has a clue?
I am using OpenRefine and have values like:
33.469.444 or 3.333.444
which I want to convert to:
33469.444 or 3333.444
So I want to remove the first dot (".") in every word.
Anyone has a clue?
If you use Jython instead of GREL... you can take advantage of a cool function called
replace(new,old,[max occurances])
like so:
return value.replace(".","",1)
If you need to remove the first 4 period characters then:
return value.replace(".","",4)
You should use the split()
function to select the first. You can do something like this:
value.split(".")[0] + value.split(".")[1] + "." + value.split(".")[2]
This will split the value on into an array based on the .
value.split(".")[0]
select the first element in the array+ value.split(".")[1]
select the second element and add it to the first (and remove the dot)+ "." +
add the dot needed in the rest of the stringvalue.split(".")[2]
select the third element in the array