Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

regex_replace with middle characters

utsarunner981
8 - Asteroid

hi! i've been trying to find something similar in the discussion but have not been successful. im playing with the regex replace formula tool and want to see if i can only get the middle part of a string. 

 

for example remove the 'DEF'

sample data output data
ABCDEFGABCG
ABCDEFGHABCGH
ABCDEFGHIABCGHI

 

thank you

 

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @utsarunner981 

 

How are you defining it as middle chars?

utsarunner981
8 - Asteroid

hi @atcodedog05 - this is the formula i wrote and giving a null. 

 

REGEX_Replace([Field1], "\w{3}*(\w*)", " ")

atcodedog05
22 - Nova
22 - Nova

Hi @utsarunner981 

 

Try a formula like this.

 

Workflow:

atcodedog05_0-1632851155383.png

 

Hope this helps : )

utsarunner981
8 - Asteroid

@atcodedog05  that worked!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @utsarunner981 

Cheers and have a nice day!

Labels