Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I'm trying to use a regex in a replace() using the Formula processor in a prepare recipe.
According to the documentation/docstring this should work, but I can't get it to recognize the text to replace parameter as a regex and not as literal text.
I'm using a formula as below. How can I get the formula language to interpret "[nN]ext" as a regex and search/replace accordingly? It's driving me crazy 🙂
replace(column1, "[nN]ext", "previous")
Operating system used: AWS Linux
Yes, that does work.
But in my specific use case I want to replace the regex with the value from another column, which you can't do with the Find/replace processor 😕
Thanks for the quick reply, though
Yes, that's it! Thanks very much
It wasn't clear to me from the documentation that the slashes were part of the required syntax. Reading it again with this knowledge, kit makes sense.
Maybe a bit more elaborate explanation in the docs would be good.
I agree regex can be a super powerful feature in Dataiku DSS. But the syntax and use can be very varied depending on where you are in the system. Things have gotten better over the years, However, I agree that the documentation regarding the use of regex has been challenging.
So I created a product idea around regex in DSS.
I’d like to invite you (and anyone else reading this post) to vote on that idea if you have not already done so and see value in it. I’d also invite you to add some comments to that post around this situation or create your own product idea regarding regex if you have another take on this.
Thanks for sharing your challenge.