Dear Community,
could you please help me with RegEx formula because I cannot find a solution to replace some part of the string:
Outer_XML |
<jed:Bilans |
<jed1:Aktywa |
<def:KwotaA |
95423752.03</def:KwotaA |
<def:KwotaB |
73549705.78</def:KwotaB |
<jed1:Aktywa_A |
<def:KwotaA |
28123841.83</def:KwotaA |
In some places I have string such as "jed:" or "def:" and I want to replace it with nothing to have i.e. <Bilans instead of <jed:Bilans as well ass 95423752.03</KwotaA instead of 95423752.03</def:KwotaA
I would be appreciated if you could help!
Hi @MK97pro ,
You can do that with a formula tool using the following Regex_Replace function:
REGEX_Replace([Outer_XML], "jed:|def:", "")
Let me know if that works for you,
Cheers,
Angelos
@MK97pro
Regex is sure the elegant one, and let go a bit ugly way 😁
and we dont do anything about "<jed1:Aktywa"?
@MK97pro - use regex_replace([Outer_XML],"^(.*\<)(.*\:)(.*)","$1$3") - that keeps the : and doesn't require def or jed to be in the xml. If you only have jed and def as options - just replace def: and jed: with "" in a regular replace command - otherwise - use my formula.