Hello, i have a few strings that i need to be converted to a number, but it has two dots both as separator, is like a:
111.111.11
22.222.22
3.333.33
Im having troubles to solve this, so anyone can help me? I need to cut off this first comma on all expressions, resulting in that way:
111111.11
22222.22
3333.33
I`m currently using that forumula, but i dont know why this not working:
REGEX_Replace([Field1],"[0-9]*[.]*/[0-9]*[.]*[0-9]", '[0-9]*[.]*[0-9]')
Solved! Go to Solution.
regex_replace([field1],"(\d+)\W(.*)","$1$2") worked for me.
Worked for me too, but i have a larger base that has more dots, if we have 3 or more dots your formula doesnt work, like 7.777.777.777.00
The real issue that a only need the last dot on right, the rest will error thw flow. Those vallues will be converted to a fixed decimal 18.2
EDIT: @ArtixWinterguard Got my solution tweaked, sorry for confusion. Again, the solution posted by @apathetichell works well with initial question, but I would approach it differently with the new requirements. My recomendation is to use a lookahead to replace all dots that aren't the last.
REGEX_Replace([String], '\.(?=.*\.)', '')
Hi @ArtixWinterguard ,
The below attached workflow should help.
Input :-
workflow :-
output :-
Regards,
Shreyansh
Thank you guys! All your solutions have worked for me!
fyi - I'd go for replace
([left([field1],length([field1]-3),",","")+right([field1],3)
a.k.a the non-regex solution.