Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Find upper string and Remove

BosKev
8 - Asteroid

Hi,

 

How do I use a formula or tool to Find and remove part of a string. Thanks.

 

EXAMPLE: I want to remove all string after "STE", include STE

 

105 W Madison St STE 101

100 Westminster St STE 1050

 

Output

105 W Madison St

100 Westminster St

 

 

3 REPLIES 3
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @BosKev,

 

You could use TRIM(REGEX_Replace([Text], '(.*)STE.*', '$1'))

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

BosKev
8 - Asteroid

Thank you!

grossal
15 - Aurora
15 - Aurora

Hi @BosKev,

 

you could use the Regex_Replace Function in the formula tool to do this:

 

grossal_0-1588093445863.png

 

Formula: 

REGEX_Replace([String], '\s[A-Z]+\s', ' ',0)

 

 

Output: 

grossal_1-1588093472439.png

 

Sample workflow attached. Let me know what you think.

 

Best

Alex

Labels
Top Solution Authors