Hi,
I have this line in python I want to do in alteryx:
df['Name'].str.replace('\W', ' ')
So i believe this line is not only "=" is replaced but any non-word character, e.g. "%","&","§","/",...
How do I create this in alteryx?
I am trying this formula "Replace([Name],'\W', ' ')" but I think this literally looks for \W.
Any help would be appreciated.
Solved! Go to Solution.
The expression that you're looking for (not the drones) is:
Regex_Replace([Name],"\W",'')
Check out more RegEx help by pressing F1 (from Designer).
Cheers,
Mark
Thanks for this.
Regex_Replace([Name],"\W",' ')
I added an extra space in the ' '
but how can I alter this for two punctuations in a string?
ie "alteryx=cool - community" to alteryx cool community . Except its creating 2 spaces between cool and community.
But i still want the formula to count for "alteryx=cool" to alteryx cool.
Do you have something to incorporate both of those scenarios?
You can look at the RegEx docs, but a space is: \s and 1 or more spaces is \s+
Cheers,
Mark