This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
So here is my rant/debate between the functions ReplaceChar() vs Replace() in Alteryx. Here is the setup data:
Carr","Bret","D","Carr","Spouse","
I want to replace:
","
With a single underscore:
_
See image below. What I received with ReplaceChar() was three underscores! I'm sure there is a use case for this but I'd love to hear anyone's use case if you have one!
Here is the difference for using the two. I don't see the point of the ReplaceChar () if Replace() can do nearly the exact same thing.
Rant over. 😂
Rant accepted (sorry @Rant , this isn't about you!)
replacechar will replace any characters listed it the specified replacement. If you have "," being replaced, it treats each char independently.
replace looks for the string in its entirety. It replaces "," nicely with a single underscore.
Cheers,
mark