My input source has a column with primary name and/or residents. The client sometimes uses designations (H) or (H) Shannon**Slattery** to identify the tenants unit type etc...I have tried to filter this out a few different ways including using regex_replace([Residents],"[^\sa-zA-Z]",'') or regex_replace ([Residents],"(H)",'') I need the tenant name to stay but any and all designations to be removed. I even tried the find replace and that did not work as expected. I have attached screenshots. With 6 weeks into the use of this tool; any guidance suggestions, would greatly be appreciated.
Solved! Go to Solution.
@sslattery17 use the replace funtion
Try a few formulas
Create a new field New Name
Replace([Primary Name], "(H)", "")
REGEX_Replace([New Name], "[^a-zA-Z0-9 ]", "")
Trim([New Name])
Check out all of the available Functions here: Functions (alteryx.com)
Chris
I used the following
replace([Primary Name],'(H)', "") and it removed the (H); I used same replace formula to try and remove the ** as shown below; but it removed all the names or replaced them with 0.
I used same replace formula to try and remove the ** as shown below; but it removed all the names or replaced them with 0.
replace({Primary Name], "**", "")
**Kimberly** Elam
Alexandria** Mickens
Kevin** Hanks
Also tried
and also regex_replace([Primary Name], "[^a-zA-Z0-9 ]", "") That left the ** and the (H).
The replace formula for the (H) worked but the regex formula did not work for removing the ** from any part of the name.
After cleaning up a few formulas in my workflow and moving a few around; both formulas as noted in this feed worked to remove/replaced the unwanted characters without filtering out the data. Thanks for the help.
@sslattery17 what is the expected result?