[str] = "xyz+=/"
REGEX_Replace([str], "/", "%2F") = "xyz+=%2F"
REGEX_Replace([str], "=", "%2D") = "xyz+%2D/"
REGEX_Replace([str], "+", "%2B") = null
In the above, replace works fine unless you are trying to replace the character "+" -- there doesn't seem to be a way to escape the character either, why?
Solved! Go to Solution.
I would suggest using REPLACE rather than regex replace in these cases as you are not using regular expression functions.
Replace([str], "/", "%2F") = "xyz+=%2F"
Replace([str], "=", "%2D") = "xyz+%2D/"
Replace([str], "+", "%2B") = "xyz%2B=/"
To escape a plus in REGEX_Replace use \+:
REGEX_Replace([str], "\+", "%2B")
Thanks.
I wasn't using any REGEX in my example but I actually am in my model, it still wouldn't work with "\+" so I ended up using the normal REPLACE() in combination and that seems to work.
You can also use [+] if \+ doesn't work
Should work to escape + as well
Thank you!