Hi,
I have a column in my project that has a lot of URL encoding that I
would like to remove. If I perform a single replace, that particular
encoded character is replaced as expected. i.e.
replace(value, "%26", "&")
But given there are so many characters I would like to handle them all
in one transform statement and not do each different type of character
one at a time.
I have also tried the following but it is not recursive.
if (value.contains('%20'),replace(value, "%20", " "),
if (value.contains('%21'),replace(value, "%21", "!"),
if (value.contains('%22'),replace(value, "%22", "\""),
if (value.contains('%23'),replace(value, "%23", "#"),
if (value.contains('%24'),replace(value, "%24", "$"),
if (value.contains('%25'),replace(value, "%25", "%"),
if (value.contains('%26'),replace(value, "%26", "&"),
if (value.contains('%27'),replace(value, "%27", "'"),
if (value.contains('%28'),replace(value, "%28", "("),
if (value.contains('%29'),replace(value, "%29", ")"),
if (value.contains('%2A'),replace(value, "%2A", "*"),
if (value.contains('%2B'),replace(value, "%2B", "+"),
if (value.contains('%2C'),replace(value, "%2C", ","),
if (value.contains('%2D'),replace(value, "%2D", "-"),
if (value.contains('%2E'),replace(value, "%2E", "."),
if (value.contains('%2F'),replace(value, "%2F", "/"), value)))))))))))))))))
How can I make this recursive ? so they are all processed in one GREL transform statement, or is there a function for this in GREL?
Thanks,
slahy
--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Is there documentation for these functions just to see what else is available ?